Connecting Tech Pros Worldwide Help | Site Map

mail() function issue...**URGENT!

borisding's Avatar
Newbie
 
Join Date: Oct 2008
Posts: 9
#1: Oct 8 '08
[MOD: Moved from PHP forum. -pbmods]

Hi there,

Well, I really need help from someone here, and hope that someone will answer my question and solve my problem. I know it's very common question and being asked by many developers:

Basically i keep getting warning message and unable to send out email:
[PHP]Warning: mail(): Failed to connect to mailserver at "mail.xxxx.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\hosting\xxxx\xxx\thankyou.php on line 314[/PHP]

I have already done what i'm supposed to do.
a) changed the setting in php.ini file, that connect to the correct mail server.
b) Added server ip address to relay and allowed to send out email, for aunthentication etc.

Basically, my script is on Server A (not mail server), and need to connect to Server B (mail server) for sending email. After everything done, and restart Server A, it's working and able to send out email. But after end of day, it's unable to send out the mail anymore, yet get the warning message instead. I'm sure the mail server is correct. So,

1) What could be the problem? is it the php installation problem?
2) Why it's not stable, only sustain for one day (next day fail to send out email)?

PS: Current php version is 4.3.9, on Windows server 2000 with IIS support.

Pls help! thanks in advance.
Ferris's Avatar
Member
 
Join Date: Oct 2007
Location: Shanghai
Posts: 102
#2: Oct 8 '08

re: mail() function issue...**URGENT!


Maybe there's a firewall on Server B , it regarded your e-mail as a spam.
I suggest you may change an E-Mail account and have a try, to make sure there's no problems in PHP.
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#3: Oct 9 '08

re: mail() function issue...**URGENT!


If your code isn't changing, then it sounds like something is going on on your mail server. I'm going to go ahead and move this thread and let our Linux Experts have at it.
micmast's Avatar
Familiar Sight
 
Join Date: Mar 2008
Location: Belgium
Posts: 136
#4: Oct 9 '08

re: mail() function issue...**URGENT!


what mail server are you using?
borisding's Avatar
Newbie
 
Join Date: Oct 2008
Posts: 9
#5: Oct 10 '08

re: mail() function issue...**URGENT!


Hi Guys,

Thanks for all replies! Anyway, the problem is already. Basically i have decided migrated the php application to the new server.. Thought the Original server is too old and not strong enough to connect to mail Server (what I read from other forums).

Anyway, I didn't change any scripts inside the application,apart from some setting in php.ini for new server, of course.|o| Now the problem is solved on the new server..

Thanks.
Reply