...
|
...
|
@@ -107,6 +107,9 @@ class SendJob { |
|
|
// 每个收件人单独发送
|
|
|
$data['maildata']['tos'] = [$to];
|
|
|
//替换邮件内容中的指定字段为客户名字
|
|
|
if(empty($to['name'])){
|
|
|
$to['name'] = explode('@',$to['email'])[0]??'';
|
|
|
}
|
|
|
$data['maildata']['body'] = str_replace('{customer_name}', ucwords($to['name']), $data['maildata']['body']);
|
|
|
$result = \Lib\Mail\MailFun::sendEmail($data['maildata'],$email);
|
|
|
_echo('邮件发送 '.json_encode($result,JSON_UNESCAPED_UNICODE));
|
...
|
...
|
|