dsbfbz75185 2014-04-25 08:25
浏览 18
已采纳

php电子邮件域名

mail("xxxxx@xxxxxx.com",
    'This is the subject!',
    '<div style="background:black;color:green;width:100%;height:1000px;">Email email message message HEy</div>',
    "Content-type: text/html; charset=iso-8859-1; From: 1234abc"
);

When I send this to my mail, it shows as a black background and green text. But the From header doesn't work. It just shows as apache apache@ns209646.ip-188-165-193.eu where 188.165.193.158 is my servers ip address.

enter image description here

  • 写回答

2条回答 默认 最新

  • doujiu7680 2014-04-25 09:01
    关注

    Multiple extra headers should be separated with a CRLF ( ).

    $headers = 'From: 1234abc <webmaster@example.com>' . "
    " .
    'Reply-To: webmaster@example.com' . "
    ";
    

    However i suggest using an automated mailer I use http://swiftmailer.org/ and got rid of a lot of frustration because of headers in mails, also mails look better from spam assassin’s pov

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?