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?
Reply to discussion (solution)
Do not say to publish, is sent out, also be treated as junk mail
Do not say to publish, is sent out, also be treated as junk mail
Thank you moderator greatly reply, did not consider the problem of junk mail, I mainly want to try, seemingly not.
You can try using a 163 SMTP server.
php.ini [Mail]
Set the sending server address no ... Apache Restart
Do you have a signature?
LZ even failed to find out why?
QQ mailbox to be certified and the default is not open POP3/SMTP service
php.ini [Mail]
Set the sending server address no ... Apache Restart
Can't send after Setup, what's going on?