c# - POP-Before-SMTP

标签 c# email smtp pop3

最近我不得不将我的一个 Web 应用程序迁移到一个新的托管服务提供商。邮件和 Web 服务仍保留在旧托管站点上,但是,当我尝试从新服务器发送电子邮件时,出现错误;

“服务器拒绝了一个或多个收件人地址。服务器响应是:

450 <email_address>: Recipient address rejected: Greylisted for 5 minutes

我问我以前的托管服务提供商我需要做什么来解决这个问题,他们回答说

The mail server operates on POP before SMTP. If a valid POP login is not received before sending mail through the server, then the mail is greylisted and held for 5 minutes before a retry.

To prevent this, simply do a Receive before sending mail

有谁知道我如何在 C# 中执行 POP before SMTP?

最佳答案

我不确定 C# 将如何处理细节(套接字?),但基本上您只想连接到新的 POP 服务器。这是一个示例 POP 交易:

$ telnet new-pop-server.com 110
Connected to new-pop-server.com.
Escape character is '^]'.
+OK
USER <username>
+OK 
PASS <password>
+OK               // you're authenticated at this point 
LIST
+OK 
.                 // no new messages!
QUIT
+OK 

一旦您获得授权,您应该能够以编程方式发送您的邮件。 (USER、PASS、LIST、QUIT)都是您要发送的命令 (pop3 RFC)。

关于c# - POP-Before-SMTP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/282369/

相关文章:

IIS SMTP TLS 加密

c# - 通过 C# 和 IIS smtp 发送电子邮件时发送多个 header

c# - 为什么使用泛型的 "Equals"方法解析与显式调用不同

java - 通过 SMTP 接收电子邮件

c# - 如何使用 TextBox (WPF C#) 过滤 Datagrid 值

email - 如何从 Kynetx 电子邮件端点访问消息正文?

email - 禁用用户的电子邮件确认后Keycloak自动登录

PHP电子邮件表单-本地启用

c# - 使用 OleDbConnection 在 c# 中读取 xlsx 文件会引发错误

c# - 在 !ModelState.IsValid 上重建嵌套的 ViewModel