Wednesday, 15 May 2013

Php mail tagged as Spam in Gmail Issue fixed


When I send mail using PHP mail() function,the mail is sent to the Spam folder in GMail.


You can fix this issue by using the fifth parameter in the mail function to build the header with a valid From address.

PHP Code


$from '';

$message 'Hello';

$subject 'Test Mail';

mail($to$message$subject"From: $from""-f$from");


No comments:

Post a Comment