smtplib.SMTP_SSL()
smtplib.SMTP_SSL() is a Python function in the Smtplib Module category. Creates an SMTP client with SSL encryption from the start. The syntax is smtplib.SMTP_SSL(host="", port=0, local_hostname=None, keyfile=None, certfile=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, context=None). Returns: SMTP_SSL object. A typical example: server = smtplib.SMTP_SSL("smtp.gmail.com", 465)
server.login("user", "password"). A close sibling is smtplib.SMTP(), which creates an SMTP client for sending emails. A close sibling is SMTP.sendmail(), which sends an email message from one address to one or more recipients. A close sibling is SMTP.login(), which authenticates to the SMTP server using a username and password. A close sibling is SMTP.starttls(), which puts the SMTP connection in TLS mode for encrypted communication. More about this category: SMTP email sending — SMTP, sendmail, login, quit. Related Smtplib Module entries: smtplib.SMTP(), SMTP.sendmail(), SMTP.login(), SMTP.starttls(), SMTP.quit(), SMTP.ehlo(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.