最近我不得不将我的一个 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/