Saturday, January 17, 2009

cannot send email from php

Problem:
setting editor used to work well, but all of sudden cannot sending emails...though no changes made to the files at all.....

Reason:
after some painful google, and finally remember this is not the first time met this problem. when setup editor on dyi, already got the problem.

here it goes:
go to php.ini file find the line
SMTP = localhost

in this situation , it's not localhost, we dont' run any mail server on local machine, we use a external mail server in our company.

Solution:
here is how to fix it:
to find out what mail server we actually use, go open outlook, from top menu, choose Tools->Options->Mail Setup(tab)->Data Files->E-mail(tab) on 'E-mail Accounts' window, find the entry on the table 'Miscrosoft Exchange Server', choose that entry then click 'Change' button on the top, it bring up 'Change Email Account' window, in that window it tells you what mail server you currently use. copy the mail server's name, and paste it back to php.ini file at the line 'SMTP = localhost', restart appache, then it works again!

No comments: