mails sent through PHP mail() from going to spam

1,010 views
Skip to first unread message

Hitesh Patel

unread,
Jul 15, 2017, 8:41:45 AM7/15/17
to PHP Framework Interoperability Group
 mails sent through PHP mail() from going to spam

$to = $email;
$fromMail = "in...@prashantfarmer.com";


$subject = "Your Password";
$content = "Your Email : " . $email . " Your Password : " . $password . "";

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From: $fromMail" . "\r\n" .
"Reply-To: $fromMail" . "\r\n" .
"X-Mailer: PHP/" . phpversion();


if (mail($to, $subject, $content, $headers, "-f $fromMail")) {
echo "<script>alert('Email sent'); window.location='login-register.php' </script>";
}

Igor Rinkovec

unread,
Jul 15, 2017, 9:20:45 AM7/15/17
to php...@googlegroups.com
Not sure how is this related to PHP-FIG. If you need help relating to using PHP, try StackOverflow. I am sure however that this specific question has been answered many times before.

--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/f6764665-9fa3-43fa-a15b-046ff2dae0de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages