Page 1 of 1

why does sending emails with php code end up in spam

Posted: Sat Mar 06, 2010 8:11 am
by siko
This is what I am doing to send an activation email to user after they create an account. However, most of these end up in the spam mail folder. What can I do?

Code: Select all

 
$to      = $_POST[email];
 
$subject = "MyWebsite Account Activation";
 
$message = "Welcome to MyWebsite.com!\r\rYou, or someone using your email address, has completed registration at MyWebsite.com. You can complete registration by clicking the following link: ... //link here";
                   
$headers = 'From: admin@mywebsite.com' . "\r\n" .
 
                'Reply-To: admin@mywebsite.com' . "\r\n" .
 
                'X-Mailer: PHP/' . phpversion();
 
mail($to, $subject, $message, $headers);