dtsc1684 2015-08-17 23:45
浏览 24

电子邮件转发器到PHP

I've been capturing the body of email messages with PHP using the following code:

$fd = fopen("php://stdin", "r");
$email_content = "";
while (!feof($fd)) {
$email_content .= fread($fd, 1024);
}
fclose($fd)

So, the way its set up is mail is forwarded to the PHP script.

Works great when I send a email from a gmail account to the server email account. Message is forwared to the PHP, and PHP stores the body of the message to a variable.

But others have sent emails to my server containing HTML which doesn't work. Why wouldn't my code above be able to capture the contents of the email if it contains HTML?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 关于大棚监测的pcb板设计
    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器
    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)