无法发送邮件,它在以下代码中显示错误. [英] unable to send mail , it showing the error in below code .
本文介绍了无法发送邮件,它在以下代码中显示错误.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试发送邮件时出现此错误提示.
警告:mail()[function.mail]:无效的地址
在第88行
消息发送错误!
//行号88是if(mail($ email,$ subject,$ html,$ headers))
while i am trying to send mail this error ocuures.
Warning: mail() [function.mail]: Invalid Address
on line 88
Message sent Error!
// line no. 88 is if(mail($email,$subject,$html,$headers))
<?php
//require_once "Mail.php";
$email = '';
if(isset($_POST["visitormail"]))
{
$email = $_POST["visitormail"];
}
include('Mail.php');
include('Mail/mime.php');
if(($_POST["visitor"] == "") || (($_POST["visitormail"] == "")))
{
if($_POST["visitormail"] == "")
{
echo "Vennligst fyll du navnet <br>";
}
if($_POST["visitormail"] == "")
{
echo "Fyll venns epost <br>";
}?>
<a href="mail123.php" style="color:black;">Tilbake</a>
<?php }
else
{
$text = 'From pritamsp';
$sitename = '';
if(isset($_SERVER["REQUEST_URI"]))
{
$sitename = str_replace("/sendeail.php","",$_SERVER["REQUEST_URI"]);
}
$purl = $_POST['httpref'];
$subject ='From pritamsp';
$html = '<html><body>'.$_POST["notes"]."<br>"."<a href='".$purl."'>".$purl.'</a></body></html>';
$from='pangarkarpritam777@hotmail.com';
$headers = "From: ppppppppp <" . $from. ">\r\n";
$headers .= "Reply-To: ". $from . "\r\n";
//$headers .= "CC: sun123@example.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
if(mail($email,$subject,$html,$headers))
{
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message sent Error!</p>");
}
}
?>
推荐答案
电子邮件,
主题,
html,
这篇关于无法发送邮件,它在以下代码中显示错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文