I was seeing a smtplib python tutorial, and I see these code lines:
smtp_server = smtplib.SMTP_SSL('smtp.gmail.com', 465)
smtp_server.ehlo()
What is that .ehlo used for?
EHLO ("Extended Hello") is the SMTP command the client uses to tell the server that it is an SMTP client (HELO is the old SMTP protocol, while EHLO is the extended SMTP initialisation command).
EHLO was introduced with RFC 1869 back in 1995, so for any actual use you'll se EHLO used these days.
In effect it's just telling your smtp library to send the "Hello, I'm an STMP client and want to use the extended command set" message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With