Reply to Re: question about mail()

Your name:

Reply:


Posted by Shaun on 04/29/06 08:41

On 25 Apr 2006 12:12:12 -0700, zzz_dee@hotmail.com wrote:

>I am now trying to write a very simple php program to send email
>through a smtp server on my pc. My PC's OS is windows xp with
>apache+php.
>
>So far, the php program can send out emails. However, I found that some
>email providers such as hotmail accounts could not receive my email
>sent from my pc, while some such as yahoo could receive my email but
>classify them as spam email/rubblish email.
>
>So, I am wondering what is my problem. Is it the problem of the email
>header? I have no idea about, kindly help.

The problem is that you're presumably connecting to the remote mail
servers from your own PC, which appears to be running on a cable
modem.

The big players, like Yahoo and Hotmail (and, really, just about any
other responsible ISP these days) will not accept incoming SMTP
messages that originate from consumer IP ranges. This is due to the
huge number of "zombie" machines that sit on consumer netspace and act
as spam relays. Responsible mail servers expect emails to come from
other responsible mail servers, like the one that your ISP (should)
operate.

Try doing:

ini_set('SMTP', 'smtp.hkcable.com.hk');

...prior to calling mail(). On Windows, this will set the outbound mail
server to your ISP's registered mail server. I may have the mail
server name incorrect, I'm guessing it based upon your posting IP.

hth

-
Remove mypants to email.
<http://www.shaunc.com/>

[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

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