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 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?