Indy9 获取原始电子邮件标头?
Indy9 是否有任何方法获取特定的原始电子邮件标头(例如“主题”或“发件人”),其中仍包含传输编码(即:在 Unicode 支持较差的旧版本 Delphi 上未被 DecodeHeader 破坏),或者我是否必须手动解析整个电子邮件标头才能提取此信息?
Does Indy9 have any way to get a specific raw email header (say, "Subject" or "From") which still includes the transfer-encoding (ie: has not been mangled by DecodeHeader on older versions of Delphi with poor Unicode support), or would I have to parse the entire email header manually to extract this information?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
TIdMessage.RawHeaders
属性就是您要查找的内容,例如:The
TIdMessage.RawHeaders
property is what you are looking for, eg:我已经解决了这个问题,在调用
IdMessage1.ProcessHeaders
之前调用IdMessage1.Headers.Values['Subject']
会得到与之后不同的结果。I have solved the problem, calling
IdMessage1.Headers.Values['Subject']
BEFORE callingIdMessage1.ProcessHeaders
gives different results than after.