On this page
  1. smtplib.SMTP_SSL
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

smtplib.SMTP_SSL

Prev: smtplib.SMTP | Up: smtplib | Next: smtplib.SMTPAuthenticationError
Rel: smtplib.quoteaddr, smtplib.quotedata, smtplib.SMTP, smtplib.SMTPAuthenticationError
Ref: docs.python.org — smtplib.SMTP_SSL
Tags: #public #python3 #stdlib #smtplib


Import

import smtplib
from smtplib import SMTP_SSL

Signature & Overview

smtplib.SMTP_SSL(host='', port=0, local_hostname=None, *, timeout=<object object at 0x1040b4980>, source_address=None, context=None)

This is a subclass derived from SMTP that connects over an SSL encrypted socket (to use this class you need a socket module that was compiled with SSL support). If host is not specified, '' (the local

Methods & Attributes

Usage

import smtplib

# Implicit TLS SMTP client (port 465): with smtplib.SMTP_SSL(host, 465, timeout=30) as s: ...
assert issubclass(smtplib.SMTP_SSL, smtplib.SMTP)

Gotchas

REPL Inspect

from smtplib import SMTP_SSL
help(SMTP_SSL)

Linked from

Related notes