Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old October 8th, 2008, 03:27 AM
borisding's Avatar
Newbie
 
Join Date: Oct 2008
Posts: 4
Default mail() function issue...**URGENT!

[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.
Reply
  #2  
Old October 8th, 2008, 10:23 AM
Ferris's Avatar
Member
 
Join Date: Oct 2007
Location: Shanghai
Age: 22
Posts: 102
Default

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.
Reply
  #3  
Old October 9th, 2008, 02:56 AM
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Age: 24
Posts: 5,311
Default

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.
Reply
  #4  
Old October 9th, 2008, 07:13 AM
micmast's Avatar
Member
 
Join Date: Mar 2008
Location: Belgium
Posts: 78
Default

what mail server are you using?
Reply
  #5  
Old October 10th, 2008, 11:13 AM
borisding's Avatar
Newbie
 
Join Date: Oct 2008
Posts: 4
Default

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
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles