我正在尝试在 AWS EC2 实例上测试电子邮件验证服务,我的程序将在其中查询 SMTP 服务器(端口 25 上的邮件传输代理)。出于测试目的,我使用 Telnet 连接复制了该程序,该程序在我的本地计算机上运行良好:
telnet gmail-smtp-in.l.google.com 25
Trying 66.102.1.27...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP a20si12977453wrg.559 - gsmtp
HELO gmail.com
250 mx.google.com at your service
MAIL FROM:<testing@gmail.com>
250 2.1.0 OK a20si12977453wrg.559 - gsmtp
RCPT TO:<thisemailwillneverexist@gmail.com>
550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 https://support.google.com/mail/?p=NoSuchUser a20si12977453wrg.559 - gsmtp …Run Code Online (Sandbox Code Playgroud)