RE: Mail and hotmail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

X-Sender: webmaster@xxxxxxxxxxx
From: DWS Asia <webmaster@xxxxxxxxxxx>
Date: Thu, 04 May 2006 22:04:23 +0700
Subject: What is this? 2
Delivered-to: Markus Karlsson <maka9641@xxxxxxxxxxx>
MIME-Version: 1.0
Reply-To: DWS Asia <webmaster@xxxxxxxxxxx>
Content-type: text/html; charset=utf-8
X-Priority: 3
Importance: 3
Return-Path: DWS Asia <webmaster@xxxxxxxxxxx>
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:angelo@xxxxxxxxxxxx] 
Sent: Thursday, May 04, 2006 5:53 PM
To: Peter Lauri
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  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('theaddress@xxxxxxxxxxx', 'A nice subject', 'Some text');
> 
> It works well, but I want to change the FROM header so I do this:
> 
> mail('theaddress@xxxxxxxxxxx', 'A nice subject', 'Some text', 'From: Peter
> Lauri <peter@xxxxxxxx>');
> 
> 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux