Missing documentation for mail config options – Mailgun API support

Just came across this quirk as well and ran through the code to discover the same thing.

For me, this issue came up when I tried signing up for someones Ghost newsletter and it went to my spam folder. I looked at the headers, and looked up their dmarc records. I immediately noticed the IP of their server hosting their site in the headers, which is unfortunate, but also their dmarc policy was set to none. While the dmarc issue only happens when sending to larger lists, this can often be a surprise for folks when testing initial configuration or a test newsletter before sending to their larger list.

Leaking the host server IP address on the other hand is a much bigger issue. If someone has a vps or cloud server who’s IP has been marked as spam for any reason out of their control, this alone elevates the risk that the emails sent will end up in the spam folder. It also means, self-hosting multiple ghost sites on a single address end up sharing that issue or also end up impacted when the dmarc issue starts to happen.

If Mailgun is required for newsletters, I believe it makes sense to avoid a mixed configuration of SMTP and API anywhere the mailgun configuration is mentioned.