I would like to programmatically receive e-mails without the hassle of handling standard mail protocols (SMTP).
Is it possible to set a Mailgun route to forward (POST) all mail to an HTTP(S) endpoint? Currently, it seems to me that the provided webhooks can only notify you, rather than POST an entire email.
The Mailgun Routes API will notify you, and also provide a URL where you can download the full email content.
If that is not sufficient, you might want to look at SendGrid or Mandrill. I believe Mandrill POSTs the entire email data in their webhook.
Mailgun supports forwarding messages to an HTTP endpoint using the Forward action under routes. You can forward in Sumo Parsed format OR just post the actual mime content using a flag within the Forward URL. https://documentation.mailgun.com/en/latest/user_manual.html#routes
When you specify a URL of your application as a route destination through a forward() action, Mailgun will perform an HTTP POST request into it using one of two following formats:
Fully parsed: Mailgun will parse the message, transcode it into UTF-8 encoding, process attachments, and attempt to separate quoted parts from the actual message. This is the preferred option. Raw MIME: message is posted as-is. In this case you are responsible for parsing MIME. To receive raw MIME messages, the destination URL must end with mime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With