Quellcode durchsuchen

发邮件的bug

lizhen_gitee vor 1 Monat
Ursprung
Commit
f5d836b013
1 geänderte Dateien mit 30 neuen und 0 gelöschten Zeilen
  1. 30 0
      application/api/controller/Demo.php

+ 30 - 0
application/api/controller/Demo.php

@@ -48,6 +48,36 @@ class Demo extends Api
         })
      */
 
+    public function test_send_email(){
+
+
+        $emails = [
+            '',
+            '',
+            '',
+            '',
+        ];
+        foreach($emails as $email){
+            $message =
+                'Hi,'.$email.'!<br/>
+                    We are looking forward to seeing you at the following class tomorrow!<br/>
+                    Please arrive 10 minutes before the class timing to prepare for the harness fitting!<br/>
+                    We are located at 450 Alexandra Road, #02-01,<br/>
+                    Singapore 119960. For those who are driving, parking is available on level 2 of the building. For those who are taking public transport, the nearest mrt is Labrador Park MRT (7-10 minutes walk) and there is also a bus stop available just outside the building!<br/>
+                    We look forward to seeing you for an amazing session! ❤<br/>
+                    Best Regards,<br/>
+                    Elin Dance Studio<br/>
+                    ';
+            $obj = new Email();
+            $result = $obj
+                ->to($email)
+                ->subject('foreach email test '.date('Y-m-d H:i:s'))
+                ->message($message)
+                ->send();
+            $obj = '';
+        }
+    }
+
     public function auto_lesson_slot_notice(){
         $order = [
             'firstname' => '振',