Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
January 5, 2008, 11:28 am
rate this thread
php beginner here...
I'm having some trouble sending mail with php to hotmail/gmail
accounts. Other domains work fine (recieved email after 2 minutes).
Hotmail accounts do not receive the mail at all.
Does anyone have any experience/solution to this issue?
My code is below:
$message = "Click this (exact) link for activation: $link";
$message = wordwrap($message, 70);
$headers = "From: email@example.com\n"; // I suggest you try using only
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: My mailer";
the $email variable is deklared outside this code. And works fine.
- Janwillem Borleffs
January 7, 2008, 8:45 am
Re: Mail() problem regarding hotmail/gmail/yahoo etc
Might be related to the fact that you are using text/html as the content
type; in most cases this is regarded as originating from spammers.
Always include a Content-Type: text/plain section in your mail messages
to prevent this...
- » Problem using mail() when sending to hotmail/gmail...
- — Next thread in » PHP Scripting Forum