繁体   English   中英

邮件枪通过HTTP发送返回服务器响应:550 5.1.0收件人被拒绝

[英]Mail Gun Sending via HTTP returns Server response: 550 5.1.0 Recipient rejected

$ch = curl_init();

        curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
        curl_setopt($ch, CURLOPT_USERPWD, 'api:key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
        curl_setopt($ch, CURLOPT_URL, 'https://api.mailgun.net/v2/domain.com/messages');
        curl_setopt($ch, CURLOPT_POSTFIELDS, array('from' => 'Excited User <administrator@domain.com>',
                                                 'to' => 'tester@otherdomain.com',
                                                 'subject' => 'test',
                                                 'text' => 'message'));

        $result = curl_exec($ch);

上面是我的发送功能的代码段。 如果我在otherdomain上使用gmail,yahoo或aol,则会发送该消息。 但是,如果我使用自定义otherdomain,它将返回服务器响应:550

我错过了什么?

我发现,当您使用mailgun的传入smtp时,previois电子邮件将不可用。 您必须在他们的邮箱上再次输入它们。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM