dousu8456 2012-04-26 04:42
浏览 42
已采纳

如何用PHP发送HTML电子邮件到Gmail? 雅虎的工作原理不是gmail

I've been using php to send html emails to people daily for over a year and it has always worked until today, all the emails sent to gmail accounts just displayed the html code. I haven't changed any code recently. It always just displays the html code now in gmail instead of showing the hyperlinks and images.

Here's what it shows:

Reply-To: updates@mysite.com

MIME-Version: 1.0

Content-type: text/html; charset=UTF-8

X-Mailer: PHP/5.3.2 Message-Id: <20120426030303.E8B03A295@www1.mysite.com> Date: Wed, 25 Apr 2012 20:03:03 -0700 (PDT)

... etc.

What happened? Did google change something?

  • 写回答

2条回答 默认 最新

  • douchun1961 2012-04-26 09:08
    关注

    This has also started happening for me since yesterday: 25/04/2012. I have been receiving the same email, same format daily for the last few years - and yesterday seized to stop displaying in HTML format!

    Comparing the message content - only thing different I can see from a previous email that displayed correctly is the addition after the authentication results of the following:

    Date: Wed, 25 Apr 2012 17:31:23 -0700 (PDT) Message-Id: <4f98975b.9cecd80a.7d2a.66b3SMTPIN_ADDED@mx.google.com>

    Could this have anything to do with the cause?

    Scrap the above - take a look at this stie: http://johndoesdesign.com/blog/2012/php/getting-your-php-html-email-to-render-in-gmail/

    It appears the cause is the " " - use just " " instead. Why this would just start happening out of the blue - something must have changed gmail's end. I've tried this and solved the issue for me. Hope it does for you.

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

报告相同问题?

悬赏问题

  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法
  • ¥15 数学建模竞赛求指导帮助