How to send mail via PHP mail() and avoid spam filters

For about the past 12 years, I’ve been using PHP to send personalized Holiday Greetings to about 200 recipients, using the PHP mail() command. I am using gmail SMTP. Something must have changed in the past year, because MANY of the recipients did not get their Greeting this year, even though my program finished without any obvious errors, and reported that each batch was sent (I send only about 20 Greetings in each batch).

I would appreciate some example code that shows the best way to do a batch send and avoid spam filters.

My thanks in advance!

Sponsor our Newsletter | Privacy Policy | Terms of Service