Pear 邮件在 x 标头上添加换行符的问题
我想知道这里是否有任何有 PEAR 邮件或 PEAR 邮件队列经验的人可以帮助我解决这个问题。
我正在使用 PEAR 创建批量邮件服务,并添加 X 标头来提供有关人们注册的地点和时间的信息。
所以我正在尝试创建一个与此类似的 X 标头:
X-Subscription: Subscribed on 2010/09/01, via web form, by 92.8.196.121 from http://mydomain.com/signup.htm
但是,在我将标头传递给 PEAR 邮件 mime 和队列之后,它们在某些点处使用换行符进行格式化,因此它们最终看起来像这样:
X-Subscription: Subscribed on 2010/09/01, via web form, by 92.8.196.121 from
http://mydomain.com/signup.htm
我已经通过创建来测试了这一点一些不同的标题和换行符总是出现在一定数量的字符之后,但我似乎无法在 PEAR 中找到任何会导致这种情况的代码。
这里有人有这方面的经验吗?或者知道我可以解决这个问题的方法吗?
感谢您的关注
I was wondering if anyone here with experience of PEAR mail or PEAR mail queue could help me out with this.
I am working on creating a bulk mailing service using PEAR and am adding X-headers to give information on where and when people signed up.
So am am trying to create a X-header similar to this:
X-Subscription: Subscribed on 2010/09/01, via web form, by 92.8.196.121 from http://mydomain.com/signup.htm
However after I pass the headers to PEAR mail mime and queue they are formatted with a line break at certain points so they end up looking like this:
X-Subscription: Subscribed on 2010/09/01, via web form, by 92.8.196.121 from
http://mydomain.com/signup.htm
I have tested this by creating a few different headers and the line break always comes after a certain amount of characters but I cannot seem to find any code in PEAR which would cause this.
Does anyone here have any experience of this? Or know of a way I could fix this?
Thanks for looking
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 RFC 822,将标头拆分为多行的“问题”是正确的行为,“3.1.1. 长标题字段”部分:
如电子邮件主题长度限制是多少?中所述,RFC 2822 建议将行长度保持为 78。
The "issue" of headers being split onto multiple lines is correct behavior according to RFC 822, section "3.1.1. LONG HEADER FIELDS":
As described in What is the email subject length limit?, RFC 2822 suggests to keep a line length of 78.