doumu5662 2013-03-21 12:00
浏览 69
已采纳

发送内部电子邮件

CODE:

$from = $_GET['from'];
$to = $_GET['to'];
$headers = "From:" . $from;
mail($to, 'PHP mail() function', 'Coming from PHP mail() function', $headers);
echo 'Check your inbox for PHP mail() function';

Code above used to work for sending local emails but not anymore. Only works for sending external email. Also, swift_emailer() doesn't work either.

MORE DETAILS:

Located at:

/usr/sbin/sendmail

phpinfo() output:

sendmail_path   /usr/sbin/sendmail -t -i    /usr/sbin/sendmail -t -i

MAIL LOG:

Mar 21 12:18:27 database sendmail[15156]: r2LCEFfB015154: to=<myaddress@whateveritis.com>, ctladdr=<apache@localhost.localdomain> (48/48), delay=00:04:12, xdelay=00:04:12, mailer=esmtp, pri=120357, relay=mx00.1and1.co.uk. [212.227.15.134], dsn=5.0.0, stat=Service unavailable
Mar 21 12:18:27 database sendmail[15156]: r2LCEFfB015154: r2LCIRfB015156: DSN: Service unavailable
Mar 21 12:18:27 database sendmail[15156]: r2LCIRfB015156: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31619, dsn=2.0.0, stat=Sent
Mar 21 12:18:32 database sendmail[15162]: r2LCENGr015160: to=<myaddress@whateveritis.com>, ctladdr=<apache@localhost.localdomain> (48/48), delay=00:04:09, xdelay=00:04:08, mailer=esmtp, pri=120356, relay=mx01.1and1.co.uk. [212.227.17.175], dsn=5.0.0, stat=Service unavailable
Mar 21 12:18:32 database sendmail[15162]: r2LCENGr015160: r2LCIWGr015162: DSN: Service unavailable
Mar 21 12:18:32 database sendmail[15162]: r2LCIWGr015162: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31618, dsn=2.0.0, stat=Sent
Mar 21 12:18:50 database sendmail[15166]: r2LCEk12015164: to=<myaddress@whateveritis.com>, ctladdr=<apache@localhost.localdomain> (48/48), delay=00:04:04, xdelay=00:04:04, mailer=esmtp, pri=120357, relay=mx01.1and1.co.uk. [212.227.15.134], dsn=5.0.0, stat=Service unavailable
Mar 21 12:18:50 database sendmail[15166]: r2LCEk12015164: r2LCIo12015166: DSN: Service unavailable
Mar 21 12:18:50 database sendmail[15166]: r2LCIo12015166: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31619, dsn=2.0.0, stat=Sent
Mar 21 12:19:39 database sendmail[15229]: r2LCJcKD015229: from=apache, size=123, class=0, nrcpts=1, msgid=<201303211219.r2LCJcKD015229@localhost.localdomain>, relay=apache@localhost
Mar 21 12:19:39 database sendmail[15230]: r2LCJdfM015230: from=<apache@localhost.localdomain>, size=357, class=0, nrcpts=1, msgid=<201303211219.r2LCJcKD015229@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Mar 21 12:19:39 database sendmail[15229]: r2LCJcKD015229: to=myaddress@whateveritis.com, ctladdr=apache (48/48), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30123, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (r2LCJdfM015230 Message accepted for delivery)
  • 写回答

1条回答 默认 最新

  • douwei8672 2013-03-28 19:04
    关注

    Have you checked with your hosting company to see if they implemented an internal mail system on the server? Something that would be catching the mail and delivering it locally and not letting it leave the server? If you check your directory, it's oftentimes a folder like //Mail or something similar.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧