【发布时间】:2013-02-15 22:02:15
【问题描述】:
如何从网站发送邮件..? 我为我的静态网站使用 html 和 php,但它没有通过 xamp 服务器发送邮件....我的 php 代码是
<?php
$to = "my@domain.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "from@domain.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
但它没有发送电子邮件..
谁能帮帮我..?
【问题讨论】:
-
你是在现场工作还是在本地机器上工作?
-
senting an mail through xamp server是的 -
您是否有一个正常工作的 smtp 服务器并在您的
php.ini中设置了smtp_server设置? -
expertester.wordpress.com/2010/07/07/… - 配置您的 XAMPP 以发送电子邮件
-
你使用的是什么 SMTP 服务器?