Not receiving Amazon SES Bounce Notifications -
Not receiving Amazon SES Bounce Notifications -
i have configured postfix on server deliver @gmail.com mails amazon ses:
gmail.com smtp:email-smtp.eu-west-1.amazonaws.com:25 * :
also, configured in amazon ses console receive bounces , complains on mail service using amazon sns. problem don't receive bounce if send mail service non-existent gmail address.
if sending mail service mail.google.com address dsadaerwer.lala-band-sucks.justin-is-a-beaver@gmail.com receive:
delivery next recipient failed permanently: dsadaerwer.lala-band-sucks.justin-is-a-beaver@gmail.com
but if sending php script same address, postfix says:
e4e1a9f9ce: to=<dsadaerwer.lala-band-sucks.justin-is-a-beaver@gmail.com>, relay=email-smtp.eu-west-1.amazonaws.com[54.72.42.170]:25, delay=21, delays=0.02/0.04/11/10, dsn=2.0.0, status=sent (250 ok 00000146d86bcc13-9fa1ac16-b1cd-476e-8398-31f406d47961-000000)
so amazon ses accepts mail service don't notified of failure. can wrong?
note. when sending valid emails, works expected.
also, when sending test mail service aws ses console bounce@simulator.amazonses.com, notified via email, sending same email php script via email-smtp.eu-west-1.amazonaws.com not results in email notification.
i facing same problem. in case, i'm using phpmailer library (https://github.com/phpmailer/phpmailer/) , solved specifying sender of message.
/** * sender email (return-path) of message. * if not empty, sent via -f sendmail or 'mail from' in smtp mode. * @type string */ public $sender = '';
i setted same address $from , receive bounces in expected address.
so working code:
$this->mail = new phpmailer(); $this->mail->charset = 'utf-8'; $this->mail->from = $from_address; $this->mail->sender = $from_address; $this->mail->fromname = $from_name; $this->mail->subject = $subject; $this->mail->body = $body; $this->mail->altbody = $altbody; $this->mail->addaddress($to_address, $to_name); $this->mail->send()
if utilize setfrom method in phpmailer, set automatically sender same address.
/** * set , fromname properties. * @param string $address * @param string $name * @param boolean $auto whether set sender address, defaults true * @throws phpmailerexception * @return boolean */ public function setfrom($address, $name = '', $auto = true)
amazon-web-services amazon-ses ubuntu-server amazon-sns
Comments
Post a Comment