gpt4 book ai didi

C# 电子邮件到 gmail 标记为垃圾邮件,但来自雷鸟客户端的邮件正常发送(非垃圾邮件)

转载 作者:太空狗 更新时间:2023-10-29 23:53:31 25 4
gpt4 key购买 nike

我有一个小型 vps,其中安装了 mailenable 邮件服务器。我已经检查过 PTR 、反向 DNS 和服务器配置,一切正常。

如果我从 Thunderbird 发送电子邮件到 gmail 地址,一切正常并且邮件没有被标记为垃圾邮件,这是标题:

Delivered-To: antani2@gmail.com
Received: by 10.60.38.104 with SMTP id f8csp54812oek;
Fri, 18 May 2012 13:04:27 -0700 (PDT)
Received: by 10.216.138.130 with SMTP id a2mr7849178wej.35.1337371466927;
Fri, 18 May 2012 13:04:26 -0700 (PDT)
Return-Path: <mailrobot@charterino.com>
Received: from mail.charterino.com (mail.charterino.com. [95.110.146.72])
by mx.google.com with ESMTP id m60si12747577wee.64.2012.05.18.13.04.26;
Fri, 18 May 2012 13:04:26 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of mailrobot@charterino.com designates 95.110.146.72 as permitted sender) client-ip=95.110.146.72;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of mailrobot@charterino.com designates 95.110.146.72 as permitted sender) smtp.mail=mailrobot@charterino.com
Received: from [192.168.1.132] ([2.227.153.144]) by charterino.com with MailEnable ESMTP; Fri, 18 May 2012 22:01:40 +0200
Message-ID: <4FB6AB4A.8000508@charterino.com>
Date: Fri, 18 May 2012 22:04:26 +0200
From: "mailrobot@charterino.com" <mailrobot@charterino.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
MIME-Version: 1.0
To: antani2@gmail.com
Subject: Prova
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

当我从 C# 应用程序发送电子邮件时,我的邮件被标记为垃圾邮件,这是标题:

Delivered-To: antani@gmail.com
Received: by 10.229.39.205 with SMTP id h13csp119310qce;
Fri, 18 May 2012 12:09:26 -0700 (PDT)
Received: by 10.180.82.136 with SMTP id i8mr4157077wiy.19.1337368166529;
Fri, 18 May 2012 12:09:26 -0700 (PDT)
Return-Path: <mailrobot@charterino.com>
Received: from mail.charterino.com (mail.charterino.com. [95.110.146.72])
by mx.google.com with ESMTP id h11si2000858wiw.14.2012.05.18.12.09.26;
Fri, 18 May 2012 12:09:26 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of mailrobot@charterino.com designates 95.110.146.72 as permitted sender) client-ip=95.110.146.72;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of mailrobot@charterino.com designates 95.110.146.72 as permitted sender) smtp.mail=mailrobot@charterino.com
Message-Id: <4fb69e66.2b4cb40a.29ee.ffffa974SMTPIN_ADDED@mx.google.com>
Received: from win18864 ([::1]) by charterino.com with MailEnable ESMTP; Fri, 18 May 2012 21:06:44 +0200
MIME-Version: 1.0
From: mailrobot@charterino.com
To: antani@gmail.com

这可能是由于 messageid 不包含域 @charterino.com 引起的?我也尝试过从我的应用程序覆盖邮件 header 中的消息 ID,但服务器将其覆盖。

message.Headers.Add("Message-Id","<values>@charterino.com");

我不知道这是否是问题所在,但是......为什么雷鸟可以覆盖消息 ID 而我不能??

我正在使用 System.Net.Mail。

有什么想法吗??

添加“日期”和“主题”字段后,这是新标题,添加了

message.Headers.Add(String.format("<date format>",DateTime.Now.ToString()));

Delivered-To: antani@gmail.com
Received: by 10.229.39.205 with SMTP id h13csp155984qce;
Sat, 19 May 2012 06:20:49 -0700 (PDT)
Received: by 10.216.138.130 with SMTP id a2mr9265313wej.35.1337433648907;
Sat, 19 May 2012 06:20:48 -0700 (PDT)
Return-Path: <mailrobot@charterino.com>
Received: from mail.charterino.com (mail.charterino.com. [95.110.146.72])
by mx.google.com with ESMTP id p8si14856169weh.0.2012.05.19.06.20.48;
Sat, 19 May 2012 06:20:48 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of mailrobot@charterino.com designates 95.110.146.72 as permitted sender) client-ip=95.110.146.72;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of mailrobot@charterino.com designates 95.110.146.72 as permitted sender) smtp.mail=mailrobot@charterino.com
Message-Id: <4fb79e30.8878d80a.4344.ffff961dSMTPIN_ADDED@mx.google.com>
Received: from win18864 ([::1]) by charterino.com with MailEnable ESMTP; Sat, 19 May 2012 15:18:08 +0200
Subject: Invio password smarrita Charterino.com
MIME-Version: 1.0
From: mailrobot@charterino.com
To: antani@gmail.com
Date: 19 May 2012 15:18:08 +0200
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64

没有变化,邮件被标记为垃圾邮件。

最佳答案

尝试:

message.IsBodyHtml = true; 
message.Body = htmlView;

关于C# 电子邮件到 gmail 标记为垃圾邮件,但来自雷鸟客户端的邮件正常发送(非垃圾邮件),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10659240/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com