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 <>' . "\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("", " 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.

Content content content

Lose the priority flag, characteristic of all spam. Your mail is not important

gmail address most auto-mail will be flagged as spam, that setting is the choice of the gmail account holder (You)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.