I’m working on an Ionic 3 application where I need to send emails through Mailgun when users perform specific actions. The problem is weird - everything seems to work perfectly but emails never reach their destination.
When testing in my browser, I run into CORS issues so I use a Chrome extension to bypass that. After the email function executes, I get what looks like a successful response:
ResponseHeaders {
ok: true,
status: 200,
statusText: "OK",
type: 2,
url: "https://api.mailgun.net/v3/my-sandbox-domain/messages",
_body: "Mailgun Magnificent API"
}
The API call appears successful with a 200 status code, but the emails never show up in the recipient’s inbox. I’ve checked spam folders and they’re not there either. Has anyone experienced this issue before? What could be preventing the actual email delivery despite getting a success response from Mailgun’s API?
Check your Mailgun logs in the dashboard - that’s where you’ll see what actually happened. A 200 response just means Mailgun got your API call, but the logs show delivery status, bounces, and failures. I’ve seen emails get rejected by recipient servers because of auth issues with sandbox domains or missing SPF/DKIM records. Also check that your API key can send emails and you’re not hitting rate limits. The logs will tell you why emails aren’t delivering despite the successful API response.
check the from email in your api call - mailgun won’t send if the sender ain’t verified. also, double-check you’re not using fake test emails. had the same problem, everything seemed ok, but a typo in the recipient email made mailgun drop it without a word.
Had the same problem! Turns out I was using a Mailgun sandbox domain. Sandbox domains only let you send emails to authorized recipients - you have to manually add each email address in your Mailgun dashboard under “Authorized Recipients.” The 200 status just means Mailgun got your request, not that the email actually went through. Switching to a verified custom domain fixed it for me.