Browse Source

套餐还有二周,一周提醒,新邮件模板

lizhen_gitee 5 months ago
parent
commit
81967fd2b5
2 changed files with 30 additions and 6 deletions
  1. 2 2
      application/api/controller/Demo.php
  2. 28 4
      application/index/controller/Plantask.php

+ 2 - 2
application/api/controller/Demo.php

@@ -98,7 +98,7 @@ class Demo extends Api
 
         $message =
             'Hi,'.$order['firstname']. ' ' .$order['lastname'].'!<br/>
-                    We wanted to let you know that the following plan is set to expire in one month’s time!<br/>
+                    We wanted to let you know that the following plan is set to expire in one week’s time!<br/>
                     Plan: '.$order['name_en'].'<br/>
                     Expiry Date: '.date('d F Y',$order['endtime']).'<br/>
                     Please note that any unutilised hours will automatically be forfeited in the system. Book your next session now and continue working towards those amazing goals you have set for yourself!<br/>
@@ -112,7 +112,7 @@ class Demo extends Api
         $obj = new Email();
         $result = $obj
             ->to($order['email'])
-            ->subject('Your Membership Plan is Expiring in One Month’s Time!')
+            ->subject('Your Membership Plan is Expiring in One Week’s Time!')
             ->message($message)
             ->send();
         dump($result);

+ 28 - 4
application/index/controller/Plantask.php

@@ -357,11 +357,23 @@ class Plantask extends Controller
         foreach($task_list as $order){
 
             try {
+                $message =
+                    'Hi,'.$order['firstname']. ' ' .$order['lastname'].'!<br/>
+                    We wanted to let you know that the following plan is set to expire in two week’s time!<br/>
+                    Plan: '.$order['name_en'].'<br/>
+                    Expiry Date: '.date('d F Y',$order['endtime']).'<br/>
+                    Please note that any unutilised hours will automatically be forfeited in the system. Book your next session now and continue working towards those amazing goals you have set for yourself!<br/>
+                    If you would like to sign up for another plan, you can contact us at 8879-9689 or check on the app!❤<br/>
+                    Best Regards,<br/>
+                    Elin Dance Studio<br/>
+                    <img src="'.config('website_url').'/assets/img/logo3.png" style="width:136px;height:115px">
+                    ';
+
                 //给这些用户发邮件
                 $result = $obj
                     ->to($order['email'])
-                    ->subject('Elin Dance Studio 套餐到期提醒!')
-                    ->message('Hi,'.$order['firstname']. ' ' .$order['lastname'].',您购买的套餐['.$order['name'].']将于'.date('Y-m-d H:i:s',$order['endtime']).'过期,建议您在过期内使用完毕!')
+                    ->subject('Your Membership Plan is Expiring in Two Week’s Time!')
+                    ->message($message)
                     ->send();
 
                 //发whatsapp
@@ -423,11 +435,23 @@ class Plantask extends Controller
         $obj = new Email();
         foreach($task_list as $order){
             try {
+                $message =
+                    'Hi,'.$order['firstname']. ' ' .$order['lastname'].'!<br/>
+                    We wanted to let you know that the following plan is set to expire in one week’s time!<br/>
+                    Plan: '.$order['name_en'].'<br/>
+                    Expiry Date: '.date('d F Y',$order['endtime']).'<br/>
+                    Please note that any unutilised hours will automatically be forfeited in the system. Book your next session now and continue working towards those amazing goals you have set for yourself!<br/>
+                    If you would like to sign up for another plan, you can contact us at 8879-9689 or check on the app!❤<br/>
+                    Best Regards,<br/>
+                    Elin Dance Studio<br/>
+                    <img src="'.config('website_url').'/assets/img/logo3.png" style="width:136px;height:115px">
+                    ';
+
                 //给这些用户发邮件
                 $result = $obj
                     ->to($order['email'])
-                    ->subject('Elin Dance Studio 套餐到期提醒!')
-                    ->message('Hi,'.$order['firstname']. ' ' .$order['lastname'].',您购买的套餐['.$order['name'].']将于'.date('Y-m-d H:i:s',$order['endtime']).'过期,建议您在过期内使用完毕!')
+                    ->subject('Your Membership Plan is Expiring in One Week’s Time!')
+                    ->message($message)
                     ->send();
 
                 //发whatsapp