Not delivering to previously bounced address - Mailgun
Asked Answered
W

1

5

I'm setting up my Laravel website, and now comes the part where I configure Mailgun to send and receive emails. I followed different guides to do that, yet I don't feel I'm doing it right. I'm now stuck with this error: Failed: [email protected][email protected] 'New Order from Ibrahim Hasan' Not delivering to previously bounced address i.e. Mailgun is not able to deliver my emails. Could you please guide me through this? Thank you!

Wagers answered 22/3, 2018 at 16:32 Comment(3)
Try first with a different driver, like MailTrap.io, if the email is sent then the problem is in your Mailgun configuration.Dimetric
If you think this is a code issue, show us your code; however, I think we can clearly see that it's more of a "email spam filter" issue. If an email bounced, they don't deliver there again.Soprano
It works well on MailTrap.io.Wagers
C
11

If mail was sent and rejected by the provider (bad content, headers, etc), Mailgun will automatically blacklist that address from being sent to in the future.

This is to prevent blacklisting yourself from many of the different MX providers out there.

If you think you've solved that problem, you can perform a DELETE request through the Mailgun API in the format of DELETE /<domain>/bounces/<address> before sending the mail, and then you'll be able to send to that address again.

You can check if a bounce has happened previously by performing a POST request to POST /<domain>/bounces. Furthermore, you will receive a JSON object back with a REASON as to why the bounce occurred, giving you the ability to respond in kind to this.

If a domain is not working correctly and it's not in the blacklist, then it's possible that the MX Provider its self is not accepting the emails and is responding unfavorably in a way that Mailgun cannot handle.

You can also delete the mail directly from the Mailgun UI if you have the login credentials. Please see the comment below and give it an upvote.

Cosmography answered 22/3, 2018 at 16:39 Comment(5)
I changed the email and it worked. However, I'm not sure I understand how to remove the email which got blacklisted.Wagers
@IbrahimHasan Perform a DELETE request as indicated in my post where <domain> is the domain you're sending from, and <address> is the address you want to remove such as [email protected]Cosmography
I need more reputation points in order to vote for your answer. Thanks a lot!Wagers
@IbrahimHasan No worries. You can click the checkmark beneathe to accept it as answer. Which will also give you reputation points.Cosmography
@Cosmography has explained the correct way to delete the blockage through code. If you can login to mailgun you can also go to Suppressions > Bounces then select the email you want to free up then delete it.Fagen

© 2022 - 2024 — McMap. All rights reserved.