SMTP connection

class envelopes.conn.SMTP(host=None, port=25, login=None, password=None, tls=False, timeout=None)

Wrapper around smtplib.SMTP class.

is_connected

Returns True if the SMTP connection is initialized and connected. Otherwise returns False

send(envelope)

Sends an envelope.

class envelopes.conn.GMailSMTP(login=None, password=None)

Subclass of SMTP preconfigured for GMail SMTP.

GMAIL_SMTP_HOST = 'smtp.googlemail.com'
GMAIL_SMTP_TLS = True
class envelopes.conn.SendGridSMTP(login=None, password=None)

Subclass of SMTP preconfigured for SendGrid SMTP.

SENDGRID_SMTP_HOST = 'smtp.sendgrid.net'
SENDGRID_SMTP_PORT = 587
SENDGRID_SMTP_TLS = False
class envelopes.conn.MailcatcherSMTP(port=1025)

Subclass of SMTP preconfigured for local Mailcatcher SMTP.

MAILCATCHER_SMTP_HOST = 'localhost'

Previous topic

Envelope class

Next topic

Connection stack

This Page