-1
 $to      = $_POST['email'];
        $subject = 'Your password';
        $message = $_POST['password'];
        $headers = 'From: https://client.yourtradechoice.com/ no_reply@yourtradechoice.com' . "\r\n" ;
        $headers .='Reply-To: '. $to . "\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";   
        mail($to, $subject, $message, $headers);

mail sending in spam how to fix it ?

1 Answers1

0

Don't use php mail function to send email. Use php mailer script like Swiftmailer & use SMTP server to send emails.

Amandeep Singh
  • 276
  • 2
  • 13