PHP发送的邮件已经= 0A = 0A而不是新行 [英] PHP sent emails have =0A=0A instead of new lines
问题描述
编辑:FYI我使用的是Zend的Mailer类。
谢谢
编辑2:
更改编码类型不起作用。我编码的头到base64,身体到64,有乱码的东西。然后我尝试使用base64头文件,并在主体上做了base64_decode(base64_decode($ body))),这在用户的CNR服务器但不在收件箱中是好的,这意味着什么。当我尝试mb_convert_encoding到base64时,我得到了编码的字符串而不是身体,所以没有用。
我还可以尝试什么? Zend Mailer仅支持Quoted Printable和Base64标头编码。不确定该怎么做才能匹配引用的可打印编码...
电子邮件正文已编码使用 quoted-printable - 但是声明的MIME类型电子邮件是text / html(或文本/简单或未定义)。
如何使邮件正文的编码与mime标头匹配取决于您。
For some time now I've had the problem of some of my users getting =0A=0A instead of new lines in emails I send to them via PHP. Correspondence via email client works well, but PHP generated emails always look like this with some users (a minority). Googling revealed no decent results, all search results seem to be connected with outlook somehow - and it is unacceptable to think that all outlook users would suffer from this problem. Does anyone know a correct way of handling this and avoiding these new line encoding issues?
Edit: FYI I'm using Zend's Mailer class.
Thanks
Edit 2:
Changing the encoding type did not work. I encoded the headers to base64, and the body to 64, got garbled stuff. Then I tried with base64 headers, and did base64_decode(base64_decode($body)) on the body, and that was fine on the user's "CNR Server but not in the inbox" whatever that means. When I tried mb_convert_encoding to base64, I got the encoded string instead of the body again, so no use.
What else can I try? Zend Mailer only supports Quoted Printable and Base64 header encoding. Not sure what to do to the body for it to match the quoted printable encoding...
The email body has been encoded using quoted-printable - but the mime type declared in the email is text/html (or text/plain or undefined).
How you make the encoding of the body of the email match the mime header is up to you.
这篇关于PHP发送的邮件已经= 0A = 0A而不是新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!