Email Received is a different email than my "From" email in Admin Area

So I’ve configured my Member settings so people can sign up to receive a newsletter. I’ve successfully configured my DNS as explained by Mailgun’s help documents and I am able to successfully receive email from my blog.

However, the problem is that the from address is way different than what’s in the Admin Area. It should be noreply@n0sec.tech but I’m seeing that it’s noreply=n0sec.tech@mail.n0sec.tech. mail.n0sec.tech is the domain I configured on Mailgun and configured my DNS for so that makes sense but why is the first part happening?

Can anybody help me? I’d like it to just be noreply@n0sec.tech or newsletter@n0sec.tech.

I’m assuming you configured the “Reply From” address in the labs area in your admin panel?

I didn’t need to. It was filled out when I looked. It was set to noreply@n0sec.tech. If I need to put something different, I don’t know what goes here.

Well, use your noreply@n0sec.tech email in there? Enter it again, SSH into your instance and restart ghost. Unless you’re not self hosting? If so, not sure how you restart Ghost Pro.

That’s what I did. I’m using that From address. But that’s not the address that comes through when an email is sent. It’s noreply=n0sec.tech@mail.n0sec.tech.

That’s what it looks like

Interesting. It almost looks as if the variable isn’t being parsed. Are you using mailgun or similar to send your emails?

EDIT: Just re-read the OP and you are. This is strange behaviour, as this is the set-up I have too. The only thing I can think of right now is that you’re missing a DNS entry somewhere?

Unless you’ve also added a from email address to your production file?

"mail": {
    "from": "'Custom Name' <myemail@address.com>",
    "transport": "SMTP",
    "options": {
        "service": "Mailgun",
        "auth": {
            "user": "postmaster@example.mailgun.org",
            "pass": "1234567890"
        }
    }
}

What happens if you use another mail? tried with a gmail address for example?

I would like to determine if this is platform issue by testing with any mail that things do work out. Maybe the characters in your mail address (this could sound weird) are making a bug to happen

1 Like

I haven’t added anything to my production file. Where do I get the smtp credentials to add in there? And where is the file located? You used postmaster, would mine be noreply?

Here’s what my current production json looks like

It actually does the same thing. I used my gmail address and its now nconkl1190=gmail.com@mail.n0sec.tech as the sender. It does say “On Behalf of N0Sec” and if you follow the link to “N0Sec” it shows my actual gmail address but the From address in the email itself is still strange.

And now I can’t change it back to noreply@n0sec.tech lol.

1 Like

If you head to Mailgun, in your Sending menu. At the bottom click the “Domain Settings” menu. Make sure you use the dropdown at the top left to select the correct domain name, and then get your SMTP credentials.

Then follow these instructions to set it up through SSH

So there is a platform issue then, either the configuration or something specific in your environment. It should not say on behalf of x, just present the new from address.

Can you place the complete code of your configuration so we can take a look?

Okay I’ve gone through and configured it just like you said. My user is postmaster@mail.n0sec.tech and I’ve properly configured the json and when I add the email, it works but now I have to confirm the email address. How do I do that?

Also, how would I change the user so it’s like…n0reply or noreply@mail.n0sec.tech?

"mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.mailgun.org",
      "auth": {
        "user": "postmaster@mail.n0sec.tech",
        "pass": "d782a1a4cb7bcdf8668addd4f7a85246-aaaaaaaaa-f070fb28"
      }
    }

I can see that it succeeds in the logs but I have no way to get to the link to click on it. Need some help setting that up.

@Nameless0ne You’ll want to redact that password from your post. I’d also change it now, if I were you.

If you want to change from postmaster@ you can setup a new user in the same SMTP page that you got those credentials from.

Don’t forget to set your “from” setting. It looks like you missed that part out.

@benravetta It’s not the actual password. Don’t worry. This isn’t my first time posting API keys or passwords lol.

I’ll add in the from part as well. Weird that it worked without it. How do I confirm the email address to be used as a sender? Also, what would my “from” portion look like for me? Is ‘Custom Name’ something like ‘N0Sec’? And what would I put for <myemail@address.com>?

I don’t understand what you mean. It’s not a real email address that you’re sending from, it’s an alias. You won’t be able to receive emails at Mailgun. So what is asking you to confirm your email?

Your from would look like:

"from": "'N0Sec' <whereyouwantreplies@going.to>",

This is where it asks me to confirm the postmaster address

So I could do something like

"from": "'N0Sec' <postmaster@mail.n0sec.tech>",

even though I can’t receive mail there?

Well, you want your “from” to be from an actual email address. Whatever you use in “from” in your config file, use in that box in your dash.

postmaster@ is your host for Mailgun, nobody will ever see that if you use a “from” address.

So you could use inbox@n0sec.tech or something. You understand? An actual email address, on that domain.

The easiest way to do all of this, is to put your email address into the box for the no reply email in the dash, then set up Mailgun with your API key in the box below that. I’m not sure why it’s asking you to confirm your email address, that hasn’t happened to me.

By the way, that email in the from field doesn’t need to exist if you don’t want any replies coming through.