I'm using Mailgun for a site I maintain, usually Mailgun works great, but I am encountering a strange problem. My script calls the HTTP API to send messages using Mailgun, these then show up in my log as being "accepted", but then take a very long time to be "delivered", often failing to be delivered at all and simply remaining as "accepted". Has anyone experienced a similar error or could anyone suggest a way to fix it? I'm guessing it's in the arguments supplied to the API but I can't for the life of me figure out the problem.
The problem exists for different recipient domains and different times of day.
The JSON log of a problematic message is below. I have, of course, changed addresses and domains.
{ "tags": [], "timestamp": 1411498829.247304, "envelope": { "targets": "[email protected]", "transport": "", "sender": "[email protected]" }, "recipient-domain": "address.com", "event": "accepted", "campaigns": [], "user-variables": {}, "flags": { "is-authenticated": true, "is-system-test": false, "is-test-mode": false }, "message": { "headers": { "to": "[email protected]", "message-id": "[email protected]", "from": "\"the-site-in-question.com\" <[email protected]>", "subject": "Dom, your password was reset." }, "attachments": [], "recipients": [ "[email protected]" ], "size": 556 }, "recipient": "[email protected]", "method": "http" }
As soon as your email is accepted by Mailgun, we'll initiate the first delivery attempt, sending 99% of messages in less than five minutes of receipt. Whether you need to send 15,000 messages per hour or 15 million, we can guarantee that sending rate with the Rapid Fire Delivery SLA.
This post was originally published in 2016. 3. After finding the message you want to see, click on the settings and select 'show message. ' There you go!
There is a limit of 300 messages per day on the included sandbox domain. Data retention for Logs and the Events API is 1 day. You cannot create custom domains. You can only send to Authorized Recipients; and there is a maximum of 5 Authorized Recipients.
You can define a list of routes to handle incoming emails and prioritize the sequence of their execution. Each route consists of a filter expression and an action. When a message is received, Mailgun evaluates the filter expression against it.
If this is happening regularly, it is very likely Mailgun has you on one of their low-tier IP addresses. I imagine this is the default for free accounts, since they don't want to "pollute" their good addresses with new users who may not be serious / legit.
You can check the "quality" of the IP address at a site like Sender Score. Find this line in the Mailgun log of a delivered message:
"sending-ip": "XXX.XX.XXX.XXX"
If Sender Score shows a score in the 70s, that's your problem. Send Mailgun a support ticket, as Chris suggested, and see if they can get you onto a higher quality IP address. I did so and my emails are now being sent from an IP address with a score in the 90s. Haven't had a single delay since.
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