【发布时间】:2016-04-20 02:02:56
【问题描述】:
我正在使用 Laravel 5.1 并希望将通知发送到 SMS。 @txt.bell.ca 没问题,但 @msg.telus.com 没有发送。然后我添加了一个主题行,它会发送,但没有正文。只有主题行。
现在,我发现了如何使用 PHP 的 mail() 函数来修复它。
$headers = "From: " . "name@mydomain.com" . "\r\n";
$headers .= "Reply-To: ". "name@mydomain.com" . "\r\n";
mail($to,$subject,$message,$headers,"-fname@mydomain.com");
现在,如何将它添加到 Laravel 5.1 的 Mail::send() 函数中?
编辑: 为了澄清,参数如何:
"-fname@mydomain.com"
翻译成 Mail::send() 闭包?
EDIT2:我在 PHP 文档中找到了以下信息,但这并不能帮助我将其翻译成 Laravel 的函数...
additional_parameters (optional)
The additional_parameters parameter can be used to pass additional flags
as command line options to the program configured to be used when sending
mail, as defined by the sendmail_path configuration setting. For example,
this can be used to set the envelope sender address when using sendmail
with the -f sendmail option.
谢谢!
【问题讨论】:
-
你找到解决办法了吗?