HTML 未出现在电子邮件中
我的网站发送 html 电子邮件,但我的大多数收件人收到的电子邮件都是 HTML 标记的源页面,而不是漂亮的表格布局。
该问题似乎不是电子邮件客户端问题,因为电子邮件在 gmail、yahoo、hotmail 等网络邮件客户端中正确显示...通过连接到 gmail、yahoo、hotmail 的 Outlook 或 Thunderbird 查看时它们也能正确显示等等...
但是,我有一个域名,是在名为 1and1.com 的共享托管提供商处注册的。我尝试通过他们的网络邮件客户端、thunderbird 和 Outlook 查看我的电子邮件,但在所有三种情况下,只显示 html 标记。
另外,我假设大多数收件人都使用 MS Outlook 和 MS Exchange Server,因为他们是业务/财务人员。不幸的是,我不知道如何获取由 MS Exchange Server 管理的电子邮件。
我确保发送的电子邮件包含以下标题:
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
有人知道可能出了什么问题吗?谁能推荐一个解决方案?
其他信息 我在共享主机上的电子邮件似乎可以从 youtube 等网站接收 html 电子邮件,但不能从我的 php mail() 函数接收。那么我是否做错了什么,例如没有发送足够的标头信息?也许我没有正确编码某些东西?
My website sends out html emails but most of my recipients are receiving them as HTML marked up source pages instead of the nice table layouts.
The problem doesn't appear to be an email client issue since the emails display properly in web mail clients like gmail, yahoo, hotmail etc... They also display properly when viewed through outlook or thunderbird that are connected to gmail, yahoo, hotmail etc...
However, I have one domain name that I registered with a shared hosting provider called 1and1.com. I tried viewing my emails through their webmail client, thunderbird and outlook, but in all three cases, only the html mark up showed up.
Also, I assume most of my recipients use MS Outlook with MS Exchange Server because they are business/finance people. Unfortunately, I don't know how to get an email that's managed by an MS Exchange Server.
I made sure I'm sending my emails with the following headers:
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
Does anyone know what might be wrong? can anyone recommend a solution?
Additional Info
It appears my email on shared hosting can receive html emails from sites like youtube, but not from my php mail() function. So am I doing something wrong such as not sending enough header information? maybe i'm not encoding something properly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在使用 codeigniter 发送电子邮件。我将协议从 更改
为
我不知道为什么它有效,但它有效。
I was using codeigniter to send out my emails. I changed the protocol from
to
I don't know why it worked, but it worked.