Search code examples
restsendmailmailgunemail-spec

How to resend dropped emails in mailgun


How to resend dropped emails in mailgun?

I am using mailgun to send mails in my application,but some mails are dropped. Is there any method to resend the dropped mails?


Solution

  • You can resend a message with Mailgun via their control panel and through their API. But it's only available for messages that have an associated event-type of "delivered" or "permanent fail" and are also not more than your domain's message retention period (3 days for most, I think).

    API:

    See their docs:

    curl -s --user 'api:YOUR_API_KEY' \
        https://se.api.mailgun.net/v3/domains/YOUR_DOMAIN_NAME/messages/STORAGE_URL \
        -F to='[email protected]'
    

    Control Panel:

    The Logs page allows for the resending of individual messages directly within the UI. Simply login to your Mailgun account and go to the Logs tab. Click the dropdown menu cog of any qualifying message and you'll see an option in the menu called "Resend Message"

    enter image description here

    Clicking that will cause a little popup to appear where you can enter a single recipient address.

    enter image description here