Hi there @vdereks,
Thanks for reaching out! Generally when you send email through an SMTP connection, the server will only allow you to send email From the SMTP address you’re connecting with. There are two possible reasons why this is happening.
- Fastmail has a different set of SMTP credentials for the other domain. This is likely since it would make it easier to separate emails coming from the two different domains. Connect to Domain 1’s SMTP account and send from it, and connect to Domain 2’s SMTP account to send from it.
- Fastmail handles that separate on their end, so you’re able to connect with the main address and send as any other address on the account.
Check with Fastmail to make sure you don’t have a separate SMTP login for the second domain. When our plugin makes the connection, we pass the email with the From address as it is in WP Mail SMTP if the Force From Email option is checked. If you have a separate SMTP account for the second domain, they’re likely overwriting whatever WP Mail SMTP sends in favor of the one you’re connecting with.
I hope that helps! Have a great day!
Yes I already verified with Fastmail there are NO separate credentials. Here is their exact response to my ticket:
To send out emails using one of your alternate address, all you need to do is, enter the email address – [email protected] in the Email address field on WordPress’s SMTP server configuration screen.
Please note, the username should always be your primary email address which is [email protected]. This username is used for SMTP authentication. However, the Mail clients should have an Email Address field where you can enter your alternate email addresses. The email address you enter in the Email address field is used as the From address for sending emails.
I hope this helps to clarify. Do feel free to get back to me if you have any additional questions, we’re here to help.
Hi there @vdereks,
Thanks for the response. I checked in with our team about this. If Fastmail will accept the connection on your SMTP account but allow you to send from any address on your account, there are a couple of reasons this could happen.
It’s possible that there is a conflict with another plugin that is overwriting your email address before we’re able to hand it over to Fastmail. So when an email is created and sent, before we can hand it over to your mailer service, some other plugin is changing the From email.
That would be easy to test. You would just need to shut off your other plugins and then try sending a test email with the From address set to the alternate email address. If it works, the issue has to do with a plugin conflict, in which case you could narrow it down by performing the same test repeatedly but turning plugins back on one at a time until the problem comes back.
If it’s still not using the alternate email address, something would have to be happening upstream, either with the server you’re hosted on or on the Fastmail side of things. In that case, what you could do is send a test email and ask Fastmail what that email looked like when it hit their server. If they can see the email when it arrives, they may be able to tell you what the From address was when it got there. When WP Mail SMTP sends the email and the Force From Email option is checked, we send the email with that address set as the From address. For it to not be that address, something has to be changing it after we set it. It’s just a matter of finding out where that’s happening along the line.
I hope that helps! Have a great day!
I cloned my site, disabled all plugins, and the from address is still wrong. Fastmail insists SMTP plugins can change the from: field.
Fastmail support pointed me to a legacy preferences that over-wrote sub-account FROM addresses. All is now working.