电子邮件标头中缺少 Message-Id

发布于 2024-11-26 22:15:11 字数 919 浏览 0 评论 0原文

我正在编写一个 Windows 服务,向我们的一些客户发送提醒电子邮件。最终我成功了,然后我注意到电子邮件将进入垃圾邮件文件夹。我使用了 spamscorechecker.com 评分工具,发现我的电子邮件被视为垃圾邮件,因为它们的标头中缺少 Message-Id!如果我没记错的话,message-id 应该附加到 smtp 服务器上的电子邮件中。我不知道为什么服务器不对从程序发送的电子邮件执行此操作,但显然它确实对从我们的邮件客户端或网络邮件发送的电子邮件执行此操作!我在想也许我需要在代码中做一些事情来请求它,或者 App.config 中的 smtp 设置有问题 这是我在 App.config 中的 SMTP 设置:

<system.net>
    <mailSettings>
      <smtp from="Reminder &lt;[email protected]&gt;">
        <network host="mail.myserver.net" port="587" password="my password" userName="[email protected]"/>
      </smtp>
    </mailSettings>
  </system.net>

它与身份验证有什么关系吗?

I am writing a windows service that sends reminder emails to some of our customers. Eventually I made it to work, then I noticed that the emails are going to the spam folder. I used the spamscorechecker.com score tool and I found out that my emails are considered as a spam because they are missing the Message-Id in their header ! If I'm not mistaken, message-id should be attached to the email on the smtp server. I don't know why the server is not doing it for the emails that are sent from the program, but apparently it does do it for those that are sent from our mail client or the webmail ! I was thinking that maybe there is something I need to do in my code to ask for it or maybe there is something wrong with my smtp settings in App.config
here is my SMTP settings in App.config :

<system.net>
    <mailSettings>
      <smtp from="Reminder <[email protected]>">
        <network host="mail.myserver.net" port="587" password="my password" userName="[email protected]"/>
      </smtp>
    </mailSettings>
  </system.net>

does it have anything to do with the authentication ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开浅夏 2024-12-03 22:15:11

我不知道分配消息 ID 是否可以保证您的消息不会被视为垃圾邮件,但也许它可能会有所帮助,但您可以使用 headers-property 来设置它:

  mailMessage.Header.Add("message-id", "123556677000");  

更有效的方法将将邮件证书与您的电子邮件一起发送。
邮寄证书每年可能要花费 20-30 美元。

I don't know if assigning a message-id gives you any guarantee that your message won't be treated as spam, but perhaps it might help a little bit, but you can set it using the Headers-property:

  mailMessage.Header.Add("message-id", "123556677000");  

More effective way will be sending a mail-certificate along with your e-mail message.
Mail-certificates will cost you perhaps 20-30 bucks a year.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文