Blankman
Blankman

Reputation: 267150

Mailgun production and development settings

I'm currently integrating a Rails app with Mailgun and I want to make sure I understand how production and development settings should be setup.

If I have different api-keys, is it true that the mailing lists that I create will not be visible when I use a different api key?

I want to make sure I can test things in development and isolate them from my production settings.

I had a sandbox domain setup but it wasn't even sending emails out so I am a bit confused. Do I need to create a test subdomain?

Upvotes: 1

Views: 2651

Answers (2)

Ignas Damunskis
Ignas Damunskis

Reputation: 1504

Here are some tips. I would personally register 2 separate mailgun domains:

  • mail.yourdomain.com (for production)
  • dev.yourdomain.com (for development)

Why separate domains instead of separate SMTP users for same domain? Reputation. See https://documentation.mailgun.com/en/latest/best_practices.html#reputation

Mailgun documentation says:

One of the most important assets you have in the email world (much like the real world) is your reputation. If you do not have a good reputation tied to your domain and your IP address (“IP” used herein for abbreviation), your email will not reach your recipients’ inboxes.

In other words, if you have one domain and two SMTP users for it, emails sent by development might cause a harm to the reputation of your IP and domain which is also used for production.

Upvotes: 0

unkmas
unkmas

Reputation: 987

In mailgun sandbox domain doesn't send messages. It just checks them and send you valid response. As far as i remember, you can also see this messages in web-interface.

When I worked with mailgun, i've done same thing like this:

  1. Registered two domains in mailgun - one from my production server and one for staging
  2. Setted up staging and production environments with different api-keys
  3. Setted up same api-key and domain setting for my local machine

If you will do it same way, your lists will be bound to corresponding domains, so they will only be visible to right api-keys.

Upvotes: 2

Related Questions