Ask for questions about sending mail to a PHP environment that you set up under Windows XP

Source: Internet
Author: User
Ask for questions about sending mail to your PHP environment under Windows XP!
I want to use my own PHP test environment under XP to test PHP's own mail function, I do a local hosts mapping a fake domain name, installed a winwebmail SMTP server, do not know why is sent unsuccessful, do not know what is going on. 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 is generated by PHP version.";
$mailHeaders = "From:admin@system.mail";
$a = Mail ($mailto, $mailSubject, $mailBody, $mailHeaders);
if ($a)
{
echo "Mail uccessfully sent!";
}
Else
{
echo "Error in sending mail!";
}
?>
Can the gods enlighten you?


------Solution--------------------
Do not say to publish, is sent out, also be treated as junk mail
------Solution--------------------
You can try using a 163 SMTP server.
------Solution--------------------
php.ini [Mail]
Set the sending server address no ... Apache Restart
------Solution--------------------
Do you have a signature?
------Solution--------------------
LZ even failed to find out why?
QQ mailbox to be certified and the default is not open POP3/SMTP service
------Solution--------------------
Reference:
php.ini [mail]
Set the sending server address no ... Apache
Restart
Can't send after Setup, what's going on?
  • 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.