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

smtplib.SMTP

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


Import

import smtplib
from smtplib import SMTP

Signature & Overview

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

This class manages a connection to an SMTP or ESMTP server.

Methods & Attributes

Usage

import smtplib

# Plain/STARTTLS SMTP client (call starttls(context=ssl.create_default_context()) before login)
assert hasattr(smtplib, 'SMTP')

Gotchas

REPL Inspect

from smtplib import SMTP
help(SMTP)

Linked from

Related notes