使用Mailgun SMTP接收传递失败的传递错误

时间:2015-05-15 12:11:16

标签: mailgun

目前,当我从Mailgun SMTP发送邮件时,如果没有发送邮件,则会以静默方式删除邮件,并且只会在日志中显示有关邮件的跟踪信息。交货失败时可以收到送货单,如标准电子邮件帐户? (交付说明如:This is an automatically generated Delivery Status Notification. Delivery to the following recipie...等)

1 个答案:

答案 0 :(得分:0)

您可以通过此API获取邮件枪的所有失败邮件:

RestClient.get("https://api:YOUR-API-KEY"\
  "@api.mailgun.net/v3/YOUR-DOMAIN/events",
   :params => {
    :'begin'       => 'Fri, 3 May 2013 09:00:00 -0000',
    :'ascending'   => 'yes',
    :'limit'       =>  25,
    :'pretty'      => 'yes',
    :'event'       => 'failed'
   }){|response, request, result| response }