如何使用 php 将 html 电子邮件发送到 gmail?雅虎不是gmail [英] How to send html emails to gmail with php? yahoo works not gmail

查看:42
本文介绍了如何使用 php 将 html 电子邮件发送到 gmail?雅虎不是gmail的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一年多来,我一直在使用 php 每天向人们发送 html 电子邮件,并且一直有效,直到今天,所有发送到 gmail 帐户的电子邮件都只显示 html 代码.我最近没有更改任何代码.它现在总是只在 gmail 中显示 html 代码,而不是显示超链接和图像.

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.

它显示的内容如下:

回复:updates@mysite.com

Reply-To: updates@mysite.com

MIME 版本:1.0

MIME-Version: 1.0

内容类型:文本/html;charset=UTF-8

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

X-Mailer:PHP/5.3.2 消息 ID:<20120426030303.E8B03A295@www1.mysite.com> 日期:2012 年 4 月 25 日,星期三20:03:03 -0700(太平洋夏令时间)

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

...等等

发生了什么?谷歌改变了什么?

What happened? Did google change something?

推荐答案

从昨天开始发生这种情况:25/04/2012.在过去的几年里,我每天都收到同样的电子邮件,同样的格式 - 昨天突然停止以 HTML 格式显示!

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:

日期:2012 年 4 月 25 日星期三 17:31:23 -0700 (PDT) 消息 ID:<4f98975b.9cecd80a.7d2a.66b3SMTPIN_ADDED@mx.google.com>

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?

放弃上面的 - 看看这个 stie:http://johndoesdesign.com/blog/2012/php/getting-your-php-html-email-to-render-in-gmail/

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

看来原因是 " " - 只使用 " " 代替.为什么这会突然发生 - 一定有什么改变了 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.

这篇关于如何使用 php 将 html 电子邮件发送到 gmail?雅虎不是gmail的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆