We're experiencing difficulty. Our engineers are on it. Please check status.mailgun.com for real-time updates.

Troubleshooting Messages Marked As "Accepted" But Not As "Delivered"

Table Of Contents
Quick Overview
Understand The Context
Implement The Solution
Got Questions?

Quick Overview

Most of the reasons your Mailgun logs may show a message with an Accepted event but no related Delivered event is due to an underlying DNS issue, particularly with the MX record(s) of the "To:" recipient. 

Also, if the message is scheduled for delivery at a future date, only an Accepted event will appear in the Mailgun logs until the time of delivery is reached.

Understanding The Context

Setting The Scene

Mailgun documents the lifecycle of messages by using Events.  A message with an Accepted event indicates Mailgun has successfully received your message and has enqueued it for processing.  Meanwhile, a Delivered event indicates Mailgun has successfully delivered your message to the recipient's email server. For a reference to all event types, please see our Events API documentation.

Therefore, if you see within the Mailgun logs that a message has an Accepted event but not a Delivered event, this indicates the message is in some sense "in process" and has yet to attempt delivery.  

Discerning The Nuance

Other than having submitted the message to Mailgun within the past few seconds, the reasons a message can have an Accepted event with no associated Delivered event include the following:

  • The "To:" recipient (at least temporarily) has no published MX records at the time of the delivery attempt.
  • The "To:" recipient has more than one MX host/provider specified in their DNS records.
  • The message is scheduled for a future delivery date either through the use of the delivery-time parameter/header or STO/TZO
  • Very rarely, there could be a slight delay in email delivery. If this is the case with our system, we will update the Mailgun Status Page with the pertinent information.

Implementing The Solution

Concerning "To:" Recipients With No MX Records

To check a recipient's domain to see whether any MX records 
currently exist, you can use a third-party DNS tool
such as MX Toolbox

For this scenario, after performing an MX lookup on the "To:" recipient's domain, you will notice that there are no MX records present.  Without MX records, email servers will not know where to send emails for a given domain. 

With regards to Mailgun, a lack of MX records for a recipient domain will result in an Accepted event with no paired Delivered event because we cannot determine where to send the message.  

Once the recipient adds MX records to their domain, or any temporary issues resolve with reference to their domain's DNS propagation or DNS host, you may resend the message to the recipient.

Concerning "To:" Recipients With More Than One MX Host/Provider

To check a recipient's domain to see what MX records 
currently exist, you can use a third-party DNS tool
such as MX Toolbox

For this scenario, after performing an MX lookup on the "To:" recipient's domain, you will notice that there are two or more "sets" of MX records present.  Each "set" (even if composed of only one MX record) represents a different email host/mailbox provider.  Mailgun recommends only having one email provider and its associated MX records(s) configured on a domain as more than one can lead to split delivery (i.e. unpredictable delivery to a random "set" of MX records) or no delivery attempted at all.

With regards to Mailgun, the presence of more than one MX host/provider typically results in no delivery being attempted.  The presence of more than one "set" of MX records will result in an Accepted event with no paired Delivered event because we cannot determine where to send the message.  

Once the recipient chooses one email host/mailbox provider to keep for their domain, the other set(s) of records should be removed.  You will need to resend the message to the recipient.

As a further note, we sometimes see customers add Mailgun's MX records to their root domain, which already has at least one MX record present pointing to their mailbox provider.  

dig -t MX recipientdomain.com +short
10 mxa.mailgun.org.
10 mxb.mailgun.org.
0 recipientdomain.com.

The solution is often to remove the two Mailgun MX records.  If you need to receive emails at Mailgun, we recommend using a subdomain that only has Mailgun's two MX records configured.  In the above example, removing the two Mailgun MX records informs all email servers to send 100% of email intended for recipientdomain.com to the email host/mailbox provider for recipientdomain.com.

Concerning Messages Scheduled For A Future Delivery Date

For this scenario, a message is scheduled for a future delivery date (up to 3 days into the future, depending on the account's plan). 

With regards to Mailgun, a message scheduled for a future date will result in an Accepted event with no paired Delivered event. The Delivered event will only be generated when the scheduled date/time comes to pass and the message is delivered.

There are two methods of checking the Accepted event to determine if the message is scheduled for a future date:

  • Check the event metadata for the scheduled-for field.
    1. Click the Sending option found in the left-hand navigation pane.
    2. Click the Logs suboption found among the suboptions directly below.
    3. On the resulting page, there will be a list of events. Each will have a down-arrow icon towards the right-hand side. Click the down-arrow icon for the event in question.
    4. The metadata will have various groupings of data in JSON format. The "message" group of data will have a scheduled-for field if the message was scheduled.
    5. If present, the field will be formatted in Unix time, which you can translate with a Unix time/Epoch time conversion tool such as this.  E.g. "scheduled-for": 1318633810

  • Check the MIME for the X-Mailgun-Deliver-By header. 
    1. Click the Sending option found in the left-hand navigation pane.
    2. Click the Logs suboption found among the suboptions directly below.
    3. On the resulting page, there will be a list of events. Each will have a gear icon towards the right-hand side. Click the gear icon for the event in question.
    4. Click the MIME option.
    5. The MIME will contain an X-Mailgun-Deliver-By header if the message was submitted for a future date. E.g. X-Mailgun-Deliver-By: Wed, 30 Jun 2023 18:30:00 -0000

Once the recipient adds MX records to their domain, or any temporary issues resolve with reference to their domain's DNS propagation or DNS host, you may resend the message to the recipient.

Concerning A Possible, Though Rare, Delay In Email Delivery

For this scenario, should your sending be affected by a delay within Mailgun's system, an incident along with the most current details will be posted to our status page

In such cases, our teams will be working towards delivering the messages as soon as possible. Once the incident is cleared from the status page, you can expect normal delivery times to have resumed.

Got Questions?

Mailgun by Sinch has answers! If you still have any concerns or questions, please send us a Support ticket through the Support page within your Mailgun Control Panel.  Our Support Team will be happy to assist!