Phalcon CLI电子邮件未发送

时间:2020-02-13 20:41:48

标签: php phalcon swiftmailer

我在我的CLI模块中使用vokuro Mail plugin(用于cron作业)。每当在数据库中成功创建订单时,该代码就会发送电子邮件。这是用于发送电子邮件的afterCreate()代码。

$this->getDI()
         ->getMail()
         ->send($recipients, "Order Notification", 'orderstatus1', array(
         'cname' => $this->customers->name,
         'cemail' => $this->customers->email,
         'mobile' => $this->customers->mobile,
         'customerid' => $this->customers->customerid,
         'facility' => $this->membership->facilities->facilityname,
         'transactionstatus' => (!empty($this->transactionstatus)) ? $this->transactionstatus : "",
         'qid' => $this->customers->qid,
         'mid' => $this->membershipid,
         'dob' => $this->customers->dob,
         'nationality' => $this->customers->nationality,
         'startdate' => $this->membership->membershipdate,
         'enddate' => $this->membership->membershipexpirydate,
         'orderdate' => $this->orderdate,
         'membershiptype' => $this->membership->packages->packagedesc,
         'orderamount' => $this->membership->packages->packageamount,
         'facilityname' => $this->membership->facilities->facilityname,
         'paymentoption' => $this->membership->packages->paymentoption,
         'facilityimage' => $this->membership->facilities->facilityimage
    ));

我创建了一个任务,用于手动创建订单。但是在成功创建订单后,我将在终端上打印了电子邮件文本,但从未发送过该电子邮件。从Web模块执行相同的操作即可。我正在使用以下命令。

/usr/bin/php-cli /home/xxx/public_html/xxxx/app/bootstrap_cli.php paymentprocessor

然后我的终端填写了我设置的电子邮件模板,但电子邮件未发送。这是示例输出。

Screenshot

任何帮助将不胜感激。

0 个答案:

没有答案
相关问题