Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

Prevent PHP mailer from sending using default account

Josh Martin shared this idea 5 years ago
Open Discussion

As a systems administrator, I would like the option to prevent PHP mailers from sending mail from the default account so that mail from the hostname is not flagged as spam when rejected.


--------------------------------------------------------

I've got several servers set up with dozens of clients, most of which are running WordPress. If they're not using an SMTP plugin (and most don't unless there's a reason to do so) there's a problem with the outbound mail from the site. An example of this situation would be something like this:


example.com is hosted on server1.company.com with the cPanel username examp. The site has a Contact form that sends a notification to the site owner. They use an outside email provider. The form is configured to send from info@example.com and go to admin@example.com with a confirmation sent to the visitor's email address. A visitor fills out the form and clicks Submit. The email message is generated and tries to send. The FROM address in the message is examp@server1.company.com but the envelope says info@example.com.


Depending on the mail service, some providers are rejecting these emails based on the above mismatch, and if there are spam issues, the domain that ends up getting flagged is server1.company.com, not example.com. It would be nice to be able to make the default behavior to use example.com (or whatever is each account's primary domain) as the sender domain rather than server1.company.com.

Leave a Comment
 
Attach a file