After moving servers all my system emails from the mail() function is going to spam

Hi All

We have moved VPS hosts and our system was working fine on the old server.

On the new server the emails that are being sent from our system, email confirm emails, invoices, general information etc and advertising emails are all going to spam.

The new server admins are not being much help.

The server is a WHM/cPanel server and in cPanel under the Email section and Authentication I have turned on DKIM and SPF but that has made no difference.

I am sure this is a server setting as it was working on the last server without any issues.

Any help or suggestions would be AWESOME!

Many Thanks

mrmbarnes

I’m not sure, but how are you setting the “from” address, is it one native to the server/domain or some other address? Some clients won’t accept mail if they think it’s spoofed.
Also have you considered using a mailer library like PHPmailer or SwiftMailer, they are much more reliable than the default mail() function.

The emails are coming from a valid domain name and email address… the same as the websites’ domain name and an email address that have an inbox.

As I said it was working perfectly with no issues at all on the old server.

Any other ideas?

perhaps an SPF record could help https://support.google.com/a/answer/33786?hl=en

Check to see if the IP address the messages are being sent out from (this isn’t necessarily the same IP address as your website - although it probably is) is listed on any public blacklists. Specifically Spamhaus and Spamcop. (Some blacklists are just stupid, so even if you are listed on some, they may not be highly reputable anyway).

You can also check it at Symantec:

http://ipremoval.sms.symantec.com/lookup/

Microsoft (Hotmail, Outlook, etc) will use Symantec’s database for some of their spam weighing.

In the outside chance the the IP address sending out your email is different from your website hosted IP address, then your SPF record may be mismatched and need updating.

If your new web host isn’t being very helpful, that can possibly be a telltale sign that they don’t care or just don’t have the knowledge to know what to do.

Everything is setup correctly by the looks of it… again… everything worked fine on the old server but not on the new server… I am sure it is just a setting… the SPF is fine, I am not on any blacklists, I am sending from my IP address… any other ideas?

None other than my previous one.

The php default mail() function is notoriously unreliable and finicky. Many devs avoid using it for this reason, in favour of mail libraries which are freely available.
Try some tests with simple scripts to sensd mail.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.