Mailgun Works with different email

Hi there,

I have a self-hosted subdomain install and working: blog.mydomain.com.

I had made all setup on mailgun as the following link:

I’ve setup all DNS records on cloudflare using the step by step process and created a mailgun domain: m.mydomain.com.

I’ve setup the transaction SMTP on ghost:

"mail": {
  "transport": "SMTP",
  "options": {
    "service": "Mailgun",
    "host": "smtp.mailgun.org",
    "port": 465,
    "secure": true,
    "auth": {
      "user": "noreply@m.mydomain.com",
      "pass": "password"
    }
  }
},

The transactional email works, but is not the one i’ve config.
Instead i’ve receive emails from noreply@blog.mydomain.com.

And the important part is the message comes with a warning:

This email has failed its domain’s authentication requirements. It may be spoofed or improperly forwarded.

Any ideas?

Did you put your Mailgun API key in the Ghost admin area for newsletters?

Hey… yes it is working.
The thing is the email is not the one i’ve setup.

I’ve setup the email noreply@m.mydomain.com on mailgun.
On newsletter i’ve receive an email from noreply@blog.mydomain.com.

What i understood is:

IF you are using a subdomain “blog.mydomain” for your blog, i can NOT setup another subdomain “m” or “mg”.

I’ve solve the problem setting the subdomain “blog” on mailgun.

Now its working.
Thanks.