Keeping automatic emails out of the spam folder

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
ianao
Forum Newbie
Posts: 12
Joined: Fri May 22, 2009 7:03 am

Keeping automatic emails out of the spam folder

Post by ianao »

Hi

I am trying to set up a PHP mail function that sends a new member a welcome email.

Here's a snippet:

$headers = "MIME-Version:1.0\r\n";
$headers .= "Content-type:text/html;";
$headers .= " charset=iso-8859-1\r\n";
$headers .= "From: email@email.com \r\n";

$mess="Hello ";
$mess.=ucfirst($firstname);
$mess.="<br />";
$mess.="<p>";
$mess.= "You have applied for an account with <b>us.com</b>";
$mess.="</p>";
$mess.="<br />";
$mess.="Click <a href=\"http://www.us.com/confirm_member.php?us ... \">here</a> to confirm your membership";

$re= "You have been sent a message from us.com";
mail( $email, $re, $mess, $headers);




My problem is that the recipient always seems to get the email in his/her email spam folder.

Any advice would be great.

Thanks
ianao
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Keeping automatic emails out of the spam folder

Post by josh »

Paste the rawtext message that is being received, in outlook its called full headers, in gmail its called original message
ianao
Forum Newbie
Posts: 12
Joined: Fri May 22, 2009 7:03 am

Re: Keeping automatic emails out of the spam folder

Post by ianao »

Hi

I'm using Hotmail, and I can't see any options saying 'original message'. I can get to message source if that's the same thing...?

Many thanks for your help.
Post Reply