[英]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);
Above is a snippet of my send function. 上面是我的发送功能的代码段。 if i user gmail, or yahoo or aol on the otherdomain, the message is sent.
如果我在otherdomain上使用gmail,yahoo或aol,则会发送该消息。 but if I use a custom otherdomain, it returns a Server Response: 550
但是,如果我使用自定义otherdomain,它将返回服务器响应:550
What did I miss? 我错过了什么?
I found out that when you use mailgun's incomming smtp, the previois emails will not be available. 我发现,当您使用mailgun的传入smtp时,previois电子邮件将不可用。 you have to input them again on their mailbox.
您必须在他们的邮箱上再次输入它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.