How to prevent mail from going to spam using php?

Some time ago i was facing a issue regarding to the mail. Whenever i was submit my mail it goes to spam folder. Here i found a solution for that.

$to='[email protected]'; //enter you mail here
$subject='Application Form ';

 $headers  = 'MIME-Version: 1.0' . "\r\n";
 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
 $headers .= 'From: admin <[email protected]>' . "\r\n";
  echo "Mail Successfully Sent..";

That’s it.

If you still have an issue please comment below.

Share With Friends

Also Read   How to Hide WordPress upgrade notices using php

Speak Your Mind


Time limit is exhausted. Please reload CAPTCHA.