php - 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 snippet of send function. if user gmail, or yahoo or aol on otherdomain, message sent. if use custom otherdomain, returns server response: 550
what did miss?
i found out when use mailgun's incomming smtp, previois emails not available. have input them again on mailbox.
Comments
Post a Comment