Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php mail() function gets spam email

All my emails I am sending in local WAMP or on server, with PHP mail() function, goes to SPAM folder always.

While looking for the issue, I found we've to set headers like from id, reply to, return path, mime version, char type and charset.. I have set all of them, but still email goes to SPAM folder into my Gmail / Yahoo id, any clue?

All email addresses, which I am using in from/to/replyto/return path existing in real and still it goes to SPAM, very strange !

like image 837
Aditya P Bhatt Avatar asked Jan 07 '11 07:01

Aditya P Bhatt


1 Answers

What i've found locally that sendmail_from was not set into my WAMP, and once i used, ini_set('sendmail_from', 'some_valid_email_address'); it gets to Inbox !

Wohaaa... and working into live as well..

like image 164
Aditya P Bhatt Avatar answered Sep 28 '22 08:09

Aditya P Bhatt