Ask questions about mail sending in a PHP environment set up on windowxp! I want to test the mail function of php in the php test environment set up by myself under xp. I mapped a fake domain name to hosts locally and installed a winwebmail smtp server, I don't know why the message fails to be sent. The php code is as follows:
$ MailTo = "xxxxx@qq.com ";
$ MailSubject = "Just a test Mail! ";
$ MailBody = "This is a test of PHP's mail function .";
$ MailBody. = "It was generated by PHP version .";
$ MailHeaders = "From: admin@system.mail ";
$ A = mail ($ mailto, $ mailSubject, $ mailBody, $ mailHeaders );
If ($)
{
Echo "Mail uccessfully sent! ";
}
Else
{
Echo "Error in sending mail! ";
}
?>
Can you give me some advice ???
Reply to discussion (solution)
Do not publish the email, that is, it is sent and processed as a spam.
Do not publish the email, that is, it is sent and processed as a spam.
Thanks for the reply from the moderator. I didn't take into account the spam issue. I mainly want to try it. it seems that I can't.
You can try to use the 163 smtp server.
PHP. ini [mail]
Set the sending server address ..... Restart Apache
Is there a signature?
Have you figured out the cause of LZ connection failure?
QQ mail requires authentication and the POP3/SMTP service is not activated by default.
PHP. ini [mail]
Set the sending server address ..... Restart Apache
It cannot be sent after setting. why?