这是我在App.Config中的SMTP设置:
This is my SMTP settings in App.Config:
<system> <mailSettings> <smtp from="Reminder <reminder@myserver>"> <network host="mail.myserver" port="587" password="my password" userName="reminder@myserver" enableSsl="true"/> </smtp> </mailSettings> </system>这就是我发送电子邮件的方式:
And this is how I'm sending the emails:
message.SubjectEncoding = System.Text.Encoding.UTF8; message.BodyEncoding = System.Text.Encoding.UTF8; smtpClient.Send(message);这正在工作!但是唯一的问题是,我的电子邮件将进入垃圾邮件文件夹,这是因为它们的标头中缺少Message-Id.我在Thunderbird中使用了相同的帐户,当我使用Thunderbird发送电子邮件时,已将Message-Id添加到我的电子邮件中,但是从我的应用程序发送的电子邮件中却没有发生.
this is working ! but the only problem is, my emails are going to spam folder and that's because they are missing Message-Id in their header. I use the same account in Thunderbird, when I send emails using thunderbird the Message-Id is added to my emails but it's not happening for the emails that are sent from my application.
我可以手动添加标题,例如:
I can add the header manually with something like :
message.Headers.Add("Message-Id","<3BD50098E401463AA228377848493927-1>");但是该ID不是有效的message-id,我仍然会收到负面的垃圾邮件评分.知道为什么会这样吗?
But this Id is not a valid message-id and I will still get negative spam score for it. Any idea why this is happening ?
这是我在雷鸟中拥有的东西:主持人:mail.korax/身份验证:普通密码/端口:587/安全性:STARTTLS
This is what I have in Thunderbird: host: mail.korax / authentication: normal password / port: 587 / security: STARTTLS
推荐答案您的SMTP服务器必须配置为自动包含邮件ID.如果生成自己的ID,则应遵循 RFC 2822第3.6.4节.
Your SMTP server has to be configured to automatically include the message ID. If generating your own ID, it should follow RFC 2822 Section 3.6.4.
更多推荐
为什么.NET SmtpClient发送的电子邮件缺少Message
发布评论