Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/289.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel SwiftMailer不同的域_Php_Email_Smtp - Fatal编程技术网

Php Laravel SwiftMailer不同的域

Php Laravel SwiftMailer不同的域,php,email,smtp,Php,Email,Smtp,我有一个web应用程序,它应该通过反弹控制和分析集成发送电子邮件,我的邮件代码如下: Mail::send('emails.newsletter', [ 'unsub_code' => $this->contact[$i][3], 'emailTo' => $this->contact[$i][1], 'emailFrom' => $this->email, 'user' => $this->contact[$

我有一个web应用程序,它应该通过反弹控制和分析集成发送电子邮件,我的邮件代码如下:

Mail::send('emails.newsletter', [
    'unsub_code' => $this->contact[$i][3], 
    'emailTo' => $this->contact[$i][1], 
    'emailFrom' => $this->email, 
    'user' => $this->contact[$i][0], 
    'UUID' => $this->contact[$i][2], 
    'campaignName' => $this->campaign->name, 
    'campaignId' => $this->campaign->id, 
    'header' => $header,
    'body' => utf8_encode(html_entity_decode($this->campaign->body)), 
    'footer' => html_entity_decode($this->campaign->footer)], 
    function ($m) use ($i) {
        $m->from('email@mydomain.ss', 'AAB');
        $m->to($this->contact[$i][1])->subject($this->campaign->subject);
        $headers = $m->getHeaders();
        $headers->addPathHeader('Return-Path', 'bounce@mydomain.something');
        $headers->addTextHeader('uuid', $this->contact[$i][2]);
        $headers->addTextHeader('cpName', $this->campaign->name);
        $headers->addTextHeader('cpId', $this->campaign->id);
});

我的问题是我想从other@otherdomain.xx但是保持bounce@mydomain.ss但这给了我一个错误,因为other@otherdomain与env one不一样。

就像评论中指出的jszobody这实际上是我的主机阻止我发送其他人的电子邮件的问题域,这实际上将通过从他们那里购买另一项服务来解决,这使我能够这样做


由于我正在开发应用程序,我不想使用第三方SMTP提供商,这也是一个成本合理的解决方案。

错误是葡萄牙语,但我基本上是这样说的:“预期代码为250,但得到了代码550,并显示错误与PHP或Laravel无关的消息。这是因为您的邮件服务器拒绝代表其他用户发送邮件。那么我该如何解决此问题?请使用不限制发送地址的邮件服务器。它需要像SendGrid这样的第三方SMTP提供程序。