Actually this is a common problem for all who work with php mail function. Before I start this new thread, search for 2 days a proper/correct solution for my probem. But i couldn't find of any. When I send email through my web site, It is sent as spam to gmail account. This is my code.
$headers = 'From: My web site name <firstname.lastname@example.org>' . "\r\n" ; $headers .='X-Mailer: PHP/' . phpversion(); $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "Organization: my organizatoin\r\n"; $headers .= "X-Priority: 3\r\n"; mail("email@example.com", " Subject going here ", " This is my message ", $headers);
Lot of forms has this kind of code. Some times I tried removing few lines. (Line no 2,5,6 removed. It doesn't work) still Spaming... Please show me some direction. Thank you.