I am trying something similar, just got reset emails and register emails, had to change the $header
to noreply@zzz.com
to match the website address. Didn't need SMTP
, just takes forever to receive the email....still a work in progress.
$subject = "Please reset your password";
$message = " Here is your password reset code {$validation_code}
Click here to reset your password http://www.zzz.com/Login_App/code.php?email=$email&code=$validation_code
";
$headers = "From: noreply@zzz.com";