I do set the headers now, but still the email is not delivered to Hotmail.
This is the headers that I set:

X-Sender: [EMAIL PROTECTED]
From: DWS Asia <[EMAIL PROTECTED]>
Date: Thu, 04 May 2006 22:04:23 +0700
Subject: What is this? 2
Delivered-to: Markus Karlsson <[EMAIL PROTECTED]>
MIME-Version: 1.0
Reply-To: DWS Asia <[EMAIL PROTECTED]>
Content-type: text/html; charset=utf-8
X-Priority: 3
Importance: 3
Return-Path: DWS Asia <[EMAIL PROTECTED]>
X-Mailer: PHP v4.3.11

With this code:

$headers  = "X-Sender: ".$this->myFrom." <".$this->myFromEmail.">".$eol;
$headers .= "From: ".$this->myFrom." <".$this->myFromEmail.">".$eol;
$headers .= "Date: ".date("r").$eol;
$headers .= "Subject: ".$this->mySubject.$eol;
$headers .= "Delivered-to: ".$this->myTo." <".$this->myToEmail.">".$eol;
$headers .= "MIME-Version: 1.0".$eol;
$headers .= "Reply-To: ".$this->myFrom." <".$this->myFromEmail.">".$eol;
$headers .= "Content-type: text/html; charset=utf-8".$eol;
$headers .= "X-Priority: 3".$eol;
$headers .= "Importance: 3".$eol;
$headers .= "Return-Path: ".$this->myFrom." <".$this->myFromEmail.">".$eol;
$headers .= "X-Mailer: PHP v".phpversion().$eol;

ini_set('sendmail_from', $this->myFromEmail);
mail($this->myToEmail, $this->mySubject, $this->myHTML, $headers);
ini_restore('sendmail_from');

I tried with and without the ini_set.

Best regards,
Peter Lauri




-----Original Message-----
From: Angelo Zanetti [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 04, 2006 5:53 PM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Mail and hotmail


Peter Lauri wrote:
> Best group member,
> 
> I am sending email to a hotmail thru PHP. When I send it like this it
> arrives (in the junk mail, but it arrives):
> 
> mail('[EMAIL PROTECTED]', 'A nice subject', 'Some text');
> 
> It works well, but I want to change the FROM header so I do this:
> 
> mail('[EMAIL PROTECTED]', 'A nice subject', 'Some text', 'From: Peter
> Lauri <[EMAIL PROTECTED]>');
> 
> This email does not arrive to the Hotmail inbox.
> 
> 
> If I send to a regular email, like Google Email (gmail) or a regular POP3
it
> arrives without problems.
> 
> Anyone who has experienced this problem with sending emails to Hotmail?
And
> how do you solve it?
> 
> Best regards,
> Peter Lauri
> 
  you need to set your mail headers for the mail to be assumed valid,
namely:
X-Sender
From
Date
Subject
Delivered-to
MIME-Version
Reply-To
Content-type
X-Priority
Importance
Return-Path
X-Mailer

HTH
Angelo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to