我有这个逻辑
$subject = "something.com Signup -
Please do not reply to this email. It was automatically generated.";
$body = "A new person has signed up to receive something updates:";
$headers = "From: webinquiries@something.com\n";
$headers .= "Reply-To: something@gmail.com\n";
// $headers .= 'Bcc: something@something.com' . "\r\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/plain; charset=ISO-8859-1\n";
mail($email, $subject, $body, $headers);
这似乎没问题,但有一点......我可以像这样设置smtp信息
server="smtp.something.net",
username="webinquiries@somthing.com",
password="asda.1sda",
port="587"
答案 0 :(得分:1)
你可以在php.ini中设置服务器,但用户\密码作为php的邮件内置版不支持身份验证。您应该查看第三方库(phpmailer),因为php mail()函数的功能非常不足。