通过PHP发送的“我的电子邮件"仅显示为几个收件人的标签(发送了几百个) [英] My Emails sent through PHP shows as tags only for a few recipients (sending a few hundred)

查看:98
本文介绍了通过PHP发送的“我的电子邮件"仅显示为几个收件人的标签(发送了几百个)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过PHP内置的简单邮件功能向收件人发送订单确认书,这很好用.这是在表格中设置的不错"的电子邮件,其中包含一些样式以及其中的详细信息

Im sending out an order conformation for recipients via the simple mail function built into PHP, and this works fine. It's a "nice" email set up in tables and a few styles with the details in it

但是,一些收件人只是看到html标签,当然什么也听不懂.

However a few of the recipients just see html tags, and of course can't understand anything..

如果我得到一个,它可以完美地显示在雷鸟,hotmail,gmail ..

If i get one, it shows perfectly in thunderbird, hotmail, gmail..

html是完美的,不丢失任何结束标记,并且我也已经阅读了我应该发送的一些标头.这是我的邮件发送功能:

The html is perfect, not missing any end tags, and i send some headers also as i have read i should. this is my mail send function:

$body = "some html tags, set up in a table" ;
$sendto = "The recipients email here" ;
$subject = "subject here" ;
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";
$headers .= "To: theemailhere <theemailhere>\r\n";
$headers .= 'From: <thefromemailhere>' . "\r\n";
mail($sendto, $subject, $body, $headers);

这是我这方面的错误,还是收件人选择了不接收HTML电子邮件?我的意思是说2012年还有可能吗?人们会禁用它吗?

Is this an error from my side, or has the recipient chosen not to receive html emails? I mean is this still possible in 2012 and do people disable this??

如果是这样,那么这样做可能是一个不错的解决方法.我的意思是我想避免使用纯文本.

And if so, what could be a good workaround to do this. I mean i would like to avoid using plain text.

推荐答案

是.有确实个电子邮件客户端,它们不允许HTML电子邮件.我猜较早的Outlook也是其中之一,但不确定.

Yes. There are really email clients which do not allow HTML emails. I guess older Outlooks are one of these, too, but not sure.

因此,无论如何,这不是您的错,是用户的错.参见来源1和来源2.

So, anyway, it is not your fault, it is the user's. See Source 1 and Source 2.

您永远不能确定用户的邮件程序接受什么.当然,只接受纯文本.引用源2:

And you can never be sure what does the user's mail program accept. Only plaintext is surely accepted. Quoting Source 2:

您能做的最好的事情就是预见每个主要客户的情况 破坏您的设计,然后尝试控制其破坏方式,以便 大部分收件人仍然可以阅读."

"The best you can do is anticipate how each of the major clients will break your design, and then try to control how it breaks, so that it’s still readable by most of your recipients."

只能用多部分消息来解决,但是有些人会得到纯文本.有关此问题的一些详细信息,请参见源3,有关解决方案,请参见源4.

It can be solved only with multipart messages, but then some people will get plaintext. See Source 3 for some details on the issue and Source 4 for solutions.

有关此方面的一些文档:源1 源2 源4

Some documents on this: Source 1, Source 2, Source 3, Source 4

这篇关于通过PHP发送的“我的电子邮件"仅显示为几个收件人的标签(发送了几百个)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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