dsxon40042 2013-11-24 15:45
浏览 68

电子邮件发送错误mail()函数

This error occurs when i try to use a sign up feature and im not sure as to why it is giving me this error. I have been to the page it is quoting and am still unsure as how i can correct the code that im using.. im on a go daddy hosting server if that help or is part of the error thanks :D

Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Hosting\12090176\html\flashrevise\signup.php on line 101

 $u = preg_replace('#[^a-z0-9]#i', '', $_POST['u']);
    $e = mysqli_real_escape_string($db_conx, $_POST['e']);
    $p = $_POST['p'];
    $g = preg_replace('#[^a-z]#', '', $_POST['g']);
    $c = preg_replace('#[^a-z ]#i', '', $_POST['c']);

$to = "$e";
    $from = "auto_responder@flashrevise.co.uk";
    $subject = 'Flash Revise Account Activation';
    $message = '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Flash Revise Message</title></head><body style="margin:0px;
    font-family:Tahoma, Geneva, sans-serif;"><div style="padding:15px; background:#333; font-size:24px; color:#CCC;"><a href="http://www.flashrevise.co.uk">
    <img src="http://localhost:8101/Tutorials/sandbox/myfiles/FlashRevise/style/images/logo_white.png" width="36" height="30" at="Flash Revise" style="boder:none; float:left;"></a>
      Flash Revise Account Activation </div><div style="padding:24px" font-size:17px;"> Hello '.$u.',<br><br> Click the link below to activate your account<br><br>
    <a href="http://localhost:8101/Tutorials/sandbox/myfiles/FlashRevise/activation.php?id='.$uid.'&u='.$u.'&e='.$e.'&p='.$p_hash.'"> Click here to activate your account now</a><br>
    <br> Login after successful activation using: <br>* Email Address:<b> '.$e.'</b><br>* Password: <b> '.$p.'</b></div></body></html>';
        $headers = "From: $from
";
        $headers .= "MIME-VERSION 1.0
";
        $headers .= "Content-type: text/html; charset=iso-8859-1
";
        mail($to, $subject, $message, $headers);
  • 写回答

1条回答 默认 最新

  • dongwolu5275 2013-11-24 17:30
    关注

    Bare LFs in SMTP

    Use " " to end lines and headers as recommended in php manual.

    http://php.net/manual/en/function.mail.php

    评论

报告相同问题?

悬赏问题

  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?