2021年1月20日星期三

What are the telnet commands to send an email by port 587? [duplicate]

I use the following python code to send email via port 587. Could anybody show me the corresponding raw telnet commands? Thanks.

import smtplib  server = smtplib.SMTP('smtp.gmail.com', 587)  server.starttls()  server.login(email, password)  server.sendmail(from_addr = from_addr, to_addrs = to_addrs, message)  server.quit()  

EDIT: The following is not relevant to my question. It dosen't use telnet 587. I need to telnet at 587. Please open the question.

How to send email using simple SMTP commands via Gmail?

https://stackoverflow.com/questions/65820172/what-are-the-telnet-commands-to-send-an-email-by-port-587 January 21, 2021 at 09:56AM

没有评论:

发表评论