How to remove 'via Mailgun' from emails sent using Mailgun API?

Hey everyone,

I’m trying to figure out how to send emails through Mailgun without the annoying ‘via mailgun.org’ text showing up. Right now I’m using their sandbox domain for testing, but it always adds that phrase to my emails.

I know the usual fix is to set up a custom domain, but I don’t have one to use. My company won’t let me use theirs for testing either. Are there any free options out there for getting a domain name and DNS setup just for testing this out?

If not, does anyone know of similar email API services that don’t add their name to outgoing messages? I’m open to alternatives that work like Mailgun but don’t brand the emails.

Any tips would be super helpful! Thanks in advance.

I’ve encountered this issue as well. Unfortunately, using a custom domain is really the only reliable way to remove the ‘via Mailgun’ text. For testing purposes, you could consider purchasing an inexpensive domain name from a registrar like Namecheap or GoDaddy. It’s a small investment but gives you full control.

Alternatively, you might look into services like Mailtrap for dev/testing environments. It provides a fake SMTP server and captures emails without actually sending them. This could let you test your email functionality without the branding issues, though it won’t solve the problem for production use.

hey there, i’ve dealt with this before. unfortunately, there’s no easy fix without a custom domain since mailgun needs it for tracking. maybe try sendgrid or postmark, or ask for a subdomain from your company? good luck!

I’ve been in your shoes before, and it can be frustrating. One workaround I found is using a temporary email service like Temp-Mail or 10 Minute Mail. These provide disposable email addresses you can use for testing without needing a custom domain setup.

Another option is to look into email testing tools like Mailtrap or MailHog. They intercept outgoing emails in a development environment, allowing you to see how they’d look without actually sending them. This way, you can test your email functionality without worrying about the ‘via Mailgun’ text.

If you absolutely need to send real emails for testing, consider Amazon SES. Their free tier is generous, and they don’t add branding to emails. It might require a bit more setup, but it’s a solid alternative to Mailgun for testing purposes.