Ask questions about mail sending in a PHP environment self-built in windowxp

Source: Internet
Author: User
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. P. ask questions about mail sending in the PHP environment set up by myself in Windows xp!
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 ???
------ Solution --------------------
Do not publish the email, that is, it is sent and processed as a spam.
------ Solution --------------------
You can try to use the 163 smtp server.
------ Solution --------------------
PHP. ini [mail]
Set the sending server address ..... Restart Apache
------ Solution --------------------
Is there a signature?
------ Solution --------------------
Have you figured out the cause of LZ connection failure?
QQ mail requires authentication and the POP3/SMTP service is not activated by default.
------ Solution --------------------
Reference:
PHP. ini [mail]
Set the sending server address ..... Restart Apache

It cannot be sent after setting. why?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.