Yesterday learned PHP mail function
To do a user feedback and then send comments to the Webmaster's page
But after submission, returned an error
Warning:mail () [Function.mail]: SMTP Server response:550 5.7.1
Unable to relay for wsq239@163.com in
d:/mydocument/php/jh/admin/ sendfeedback.php on line
This bug really gave me a headache for a while
I later learned that the mail function in PHP is using an SMTP protocol that comes with the system to send mail
in my machine (Win XP pro+ Apache+php+mysql) After installing IIS,
has a default SMTP virtual server in it
before using it, we need to make some changes in the PHP configuration file
Find the following section, and then make changes according to your situation
[mail Function]
; For Win32.
SMTP = localhost
Smtp_port =
; For Win32.
Sendmail_from = cocowool@msn.com
And then there is a Linux how to set up the
but I do not understand Linux, so there is no tube, hehe
If you do not set the Sendmai_from, The system prompts you that the
Mail function is also not sufficient
Warning:mail () [Function.mail]: "Sendmail_from" not set in php.ini or custom "from:" Heade R missing in
d:/mydocument/php/jh/admin/sendfeedback.php on line
PHP.ini, I found that there was still the first question. I heard that use SMTP to have permission, is not my current computer user does not have permissions
I think it should not, because only I have a user on the computer
regardless of the first change the
Virtual Server-> Property-> Access-> access control-> authentication
Remove the check boxes before Basic authentication and Integrated Windows authentication
only anonymous validation
But the problem is still unable to relay
Baidu, which is said to be a relay problem
then follow the instructions
Virtual server-> Property-> Access-> relay
Select that check box and then add the 127.0.0.1 Local address
test, OK
problem solved
But still not very clear for SMTP
And the idea of setting up a local mail test environment was not implemented
because now you can only send mail, but not the ability to receive mail
Baidu, and found that imail may be a good tool
of course there are many such as iwebmail,qmail and so on , the phase of the IMAIL
specific configuration has not been made
and so on to write a text to