PHP mail()函数 [英] PHP mail() function
本文介绍了PHP mail()函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,我想通过mail()函数在电子邮件中发送确认代码,但是代码不起作用..
请帮我.
代码为:
hello, i want to send confirmation code in email through mail() function,but code did not work..
plz help me.
CODE IS:
if(!empty($result))
{
$to="someone@domain.com";;
$subject="Your confirmation link here";
$message="Your Comfirmation link";
$message.=" Click on this link to activate your account ";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$sentmail = mail($to,$subject,$message,$headers);
}
else
{
echo "Email Address Is Not In Database!";
}
if($sentmail)
{
echo "Your Confirmation link Has Been Sent To Your Email Address.";
}
else
{
echo "Error! Cannot send Confirmation link ";
}
推荐答案
结果)) {
to = " ; ;
to="someone@domain.com";;
subject = " ;
subject="Your confirmation link here";
这篇关于PHP mail()函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文