发送电子邮件PHP脚本无法接收

时间:2013-09-12 13:10:22

标签: php email send

帮助!

我想用php发送电子邮件 这是剧本

<?php
if (isset($_POST['email']))
//if "email" is filled out, send email
{
//send email
$email = $_POST['email'] ;
$subject = $_POST['subject'] ;
$message = $_POST['message'] ;
mail("faimaknyus@gmail.com", $subject,
$message, "From:" . $email);
echo "Thank you for using our mail form";
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='email.php'>
Email: <input name='email' type='text'><br>
Subject: <input name='subject' type='text'><br>
Message:<br>
<textarea name='message' rows='15' cols='40'>
</textarea><br>
<input type='submit'>
</form>";
}
?>

当我发送im没有收到该消息链接到我的实验时 - &gt; http://goo.gl/2bDcLL

1 个答案:

答案 0 :(得分:0)

此代码正常运行。已经测试过了。确保正确设置了您的网站SMTP配置设置。为此,您可以联系您的托管服务提供商。