0

I am trying for send mail using php.But got these warning message in mail. 'This message may not have been sent by: zamisoft@gmail.com Learn more Report phishing.

My header is

$header_mail="select content from mail_header where id='1'";
$header_mail2=mysql_query($header_mail);
$fet=mysql_fetch_array($header_mail2);

$content= $fet['content'];

$Headers = "From:$content\r\n" . 
"Reply-To:$content\r\n" . 
"Content-type: text/html; charset=UTF-8 \r\n"; 
$Headers.= "MIME-version: 1.0\n";
 $Headers .= 'X-Mailer: PHP/' . phpversion()."\r\n";

Content in $content variable is zamisoft<zamisoft@gmail.com>

Any body help me for solve these issue?

shilna mk
  • 9
  • 6

1 Answers1

3

I'd already answered the same on your previous post but it is more relevant here.

The problem is simple that the PHP mail() function is not using a well configured SMTP Server.

Nowadays Email-Clients and Servers perform massive checks on the emails sending server, like Reverse-DNS-Lookups, Graylisting and whatevs. All this tests will fail with the php mail() function. If you are using a dynamic ip, its even worse.

Use the PHPMailer-Class and configure it to use smtp-auth along with a well configured, dedicated SMTP Server (either a local one, or a remote one) and your problems are gone.

https://github.com/PHPMailer/PHPMailer

Community
  • 1
  • 1
Mohammad Faisal
  • 5,783
  • 15
  • 70
  • 117