正在发送邮件但没有消息 ID
当使用 indy-10 的 tidMessage 组件发送邮件时,我收到来自客户邮件服务器的有趣拒绝:
550 Rejected: Message does not contains a Message-ID
即使使用 indy 自己的演示应用程序
http://www.indyproject.org/DemoDownloads/Indy_10_MailClient.zip
我该怎么做才能解决这个问题。谢谢!
I am getting interesting rejections from my clients mail server when sending a mail with indy-10's tidMessage component saying:
550 Rejected: Message does not contain a Message-ID
I get this even when using indy's own demo app
http://www.indyproject.org/DemoDownloads/Indy_10_MailClient.zip
what do I do to fix this. thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它适用于 Indy9,也许在 10 中事情并没有改变太多:
It works with Indy9, maybe things haven't cahnged too much in 10:
在将电子邮件编码到套接字或 TStream 时,Indy 10 中的 TIdMessage 有意省略“Message-Id”标头。您必须使用 TIdMessage.ExtraHeaders 属性,例如:
编辑:
作为此的后续操作 -
TIdMessage
现已更新,其中处理“消息”的逻辑发生了变化-ID”和“In-Reply-To”标头:https://www.indyproject.org/2016/09/12/logic-changes-in-tidmessage-regarding-message-id-and-in- reply-to-headers/
TIdMessage.MsgId
属性现在会生成“Message-ID”标头,无论电子邮件是否正在保存、流式传输或传输。因此您不再需要使用ExtraHeaders
属性。TIdMessage in Indy 10 intentionally omits the 'Message-Id' header when encoding an email to a socket or TStream. You will have to use the TIdMessage.ExtraHeaders property, eg:
EDIT:
As a followup for this -
TIdMessage
has now been updated with logic changes in how it handles the "Message-ID" and "In-Reply-To" headers:https://www.indyproject.org/2016/09/12/logic-changes-in-tidmessage-regarding-message-id-and-in-reply-to-headers/
The
TIdMessage.MsgId
property now generates a "Message-ID" header regardless of whether the email is being saved, streamed, or transmitted. So you do not need to use theExtraHeaders
property anymore.