PHP mail may be filtered out by spam?
Posted
by
Derek
on Stack Overflow
See other posts from Stack Overflow
or by Derek
Published on 2012-10-08T21:36:20Z
Indexed on
2012/10/08
21:36 UTC
Read the original article
Hit count: 214
php
I am creating a small company, and would like to send out emails to my clients once they have signed up for my service to activate their accounts. I am currently using PHP's mail() function, however I am worried that my emails are being filtered out by spam filters. Is there a better way to go about this?
$email = 'XZY Client Email address @ somedomain.com';
$emailSubject = "Welcome to XYZ Service!";
$to = $email;
$subject .= "".$emailSubject."";
$headers .= "From: [email protected]\r\n" .
"X-Mailer: php";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = "<html><body>";
$message .= "Welcome to XYZ Service! \n Activate your account by clicking the following link: link...";
mail($to, $subject, $message, $headers);
Is there a way to authenticate these emails so that my clients know that they are from my actual service? Thank you in advance!
© Stack Overflow or respective owner