Paper Lantern for cPanel accounts is being retired this year. Find out more »
cPanel & WHM Version 102 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Prevent PHP mailer from sending using default account

Josh Martin shared this idea 2 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: is hosted on 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 and go to 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 but the envelope says

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, not It would be nice to be able to make the default behavior to use (or whatever is each account's primary domain) as the sender domain rather than

Leave a Comment
Attach a file