Reply to Re: mail() not reaching hotmail

Your name:

Reply:


Posted by Jon Slaughter on 06/06/07 18:44

<e_matthes@hotmail.com> wrote in message
news:1181151919.436905.171490@z28g2000prd.googlegroups.com...
> On Jun 6, 9:29 am, Erwin Moller
> <since_humans_read_this_I_am_spammed_too_m...@spamyourself.com> wrote:
>> e_matt...@hotmail.com wrote:
>> > On Jun 6, 2:16 am, Erwin Moller
>> > <since_humans_read_this_I_am_spammed_too_m...@spamyourself.com> wrote:
>> >> e_matt...@hotmail.com wrote:
>> >> > On Jun 5, 9:52 am, "Jon Slaughter" <Jon_Slaugh...@Hotmail.com>
>> >> > wrote:
>> >> >> <e_matt...@hotmail.com> wrote in message
>>
>> >> >>news:1181061914.124630.303680@z28g2000prd.googlegroups.com...
>>
>> >> >> > Hello everyone,
>>
>> >> >> > I am trying to use the mail() function to send a simple,
>> >> >> > text-only
>> >> >> > message. I have two websites hosted by the same company, on
>> >> >> > different
>> >> >> > servers. One is old and established, one I am currently
>> >> >> > developing.
>> >> >> > I am testing the mail functionality by sending a test message to
>> >> >> > an
>> >> >> > email account associated with my old website, and to my hotmail
>> >> >> > account. The message seems to be sent to both accounts, and I
>> >> >> > receive the message on my website's email account, but it never
>> >> >> > reaches my hotmail account.
>>
>> >> >> > Are there any special headers required for hotmail? I've looked
>> >> >> > around a bit, and can't seem to figure it out. I've even tried
>> >> >> > including several different headers, but always with the same
>> >> >> > results
>> >> >> > - reaches my website's email account, but not my hotmail account.
>> >> >> > The code I am using to test is:
>>
>> >> >> > <?php
>>
>> >> >> > $body = 'Hello from the internet mail tubes!';
>> >> >> > $subject = 'Test message';
>> >> >> > $address = 'working_address@other_domain.com';
>> >> >> > $address2 = 'working_addr...@hotmail.com';
>> >> >> > $headers = "From: working_address@this_domain.com";
>>
>> >> >> > mail($address, $subject, $body, $headers) or print "Can not
>> >> >> > deliver
>> >> >> > to $address.";
>> >> >> > print "Done with $address.<br>";
>>
>> >> >> > mail($address2, $subject, $body, $headers) or print "Can not
>> >> >> > deliver
>> >> >> > to $address2.";
>> >> >> > print "Done with $address2.<br>";
>>
>> >> >> > ?>
>>
>> >> >> I think there are some issues with mail(). I'm not sure if thats
>> >> >> your
>> >> >> problem but I ran across a few bugs that it has when I was trying
>> >> >> to
>> >> >> figure out how to mail. They say the pear mail package is much
>> >> >> better
>> >> >> than this.
>>
>> >> >> The code I used for testing works fine for hotmail
>>
>> >> >> <?php
>> >> >> echo "Sending Mail...<br/>\n";
>> >> >> $to = 'testa...@hotmail.com'; // changed
>> >> >> $subject = 'test';
>> >> >> $message = 'hello';
>> >> >> $headers = 'From: webmas...@example.com' . "\r\n" . // Not
>> >> >> changed...
>> >> >> just crap addr but works
>> >> >> 'Reply-To: webmas...@example.com' . "\r\n" .
>> >> >> 'X-Mailer: PHP/' . phpversion();
>>
>> >> >> mail($to, $subject, $message, $headers) ? print "Sent mail!" :
>> >> >> print
>> >> >> "Cannot send mail";;
>> >> >> ?>
>>
>> >> >> You might look at that and see the differences. (as you can see, it
>> >> >> uses the "\r\n" and some extra info that you might see if it
>> >> >> matters
>> >> >> or not)
>>
>> >> > I started receiving the messages on the hotmail account once I added
>> >> > my domain to the safe list in hotmail. That's a step in the right
>> >> > direction, but I'd like to figure out what's missing or incorrect
>> >> > which makes it get filtered out. Any thoughts on required headers
>> >> > or
>> >> > format for hotmail?
>>
>> >> So PHP's mail() DID work just fine.
>> >> If you configured hotmail to block anything except the domains in your
>> >> 'safe list', what do you expect?
>> >> No header will fix that, unless hotmail is broken.
>>
>> >> Regards,
>> >> Erwin Moller
>>
>> > I didn't configure hotmail to block anything except the domains in my
>> > 'safe list'. I have never used the safe list option, and I've been
>> > using this account for about 7 years with very little spam, and
>> > without setting up custom spam filters.
>>
>> Ok clear. I didn't know that.
>> (Never used hotmail)
>>
>> Some mailservers are extremely picky when it comes to headers.
>> You could try to add a few, like:
>> Return-Path
>> Meassage-ID
>>
>> Maybe that helps. :-/
>>
>> Good luck.
>> Erwin Moller
>>
>> PS: A guy named Gordon Burditt frequents this group and knows a lot more
>> about mailprotocols than I do. Maybe contact him. :-)
>
> Thanks, I'll look out for him. In the mean time, I'll post a message
> like most other sites do that if the user doesn't receive initial
> messages, to check their spam filter settings. I'll also play around
> with headers, starting with the ones you suggested.
>

If you do find the problem and solution post it here so we'll have a record
of it incase someone else runs into it too.

Jon

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация