What coding is used in this string?

时间:2016-10-19 13:41:38

标签: string email

My app is downloading eMails from a POP3 server. But it receives "strange" subject lines. I see there is a pattern of coding in there. But what exactly is that coding? What do I google for if I want cover the parsing of lines like that?

=?utf-8?Q?HMS=20will=20no=20longer=20provide=20Netbiter=20SIM=2Dcards?=

The eMail header is:

Subject: =?utf-8?Q?HMS=20will=20no=20longer=20provide=20Netbiter=20SIM=2Dcards?=

So I know it's coded by the sender. Also this is just one of many header lines, which all seem to be valid. The subject is obviously HMS will no longer provide Netbiter SIM-cards after you replace "=20" with spaces and all the other stuff. The eMail is just a notification from a supplier.


Found it myself: RFC 2047

1 个答案:

答案 0 :(得分:1)

我不记得确切,但我之前遇到过这样的问题。如果主题大于某个字符长度(我认为是75个字符),则主题将无法正确解析。

这曾经是codeIgniter中的一个问题(我现在不使用它,所以不知道这个问题的当前状态)

要解决此问题,您可能需要更改电子邮件配置。

此问题可能还有其他原因,但我认为这是因为您的主题中有更多字符。