4

帮助!

我想用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>";
}
?>

当我发送我没有收到我的实验的消息链接-> http://goo.gl/2bDcLL

4

1 回答 1

0

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

于 2013-09-12T13:28:29.210 回答