# Stubs for smtplib (Python 3.4)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Undefined, Any

class SMTPException(OSError): pass
class SMTPServerDisconnected(SMTPException): pass

class SMTPResponseException(SMTPException):
    smtp_code = Undefined(Any)
    smtp_error = Undefined(Any)
    args = Undefined(Any)
    def __init__(self, code, msg): pass

class SMTPSenderRefused(SMTPResponseException):
    smtp_code = Undefined(Any)
    smtp_error = Undefined(Any)
    sender = Undefined(Any)
    args = Undefined(Any)
    def __init__(self, code, msg, sender): pass

class SMTPRecipientsRefused(SMTPException):
    recipients = Undefined(Any)
    args = Undefined(Any)
    def __init__(self, recipients): pass

class SMTPDataError(SMTPResponseException): pass
class SMTPConnectError(SMTPResponseException): pass
class SMTPHeloError(SMTPResponseException): pass
class SMTPAuthenticationError(SMTPResponseException): pass

def quoteaddr(addrstring): pass
def quotedata(data): pass

class SMTP:
    debuglevel = Undefined(Any)
    file = Undefined(Any)
    helo_resp = Undefined(Any)
    ehlo_msg = Undefined(Any)
    ehlo_resp = Undefined(Any)
    does_esmtp = Undefined(Any)
    default_port = Undefined(Any)
    timeout = Undefined(Any)
    esmtp_features = Undefined(Any)
    source_address = Undefined(Any)
    local_hostname = Undefined(Any)
    def __init__(self, host='', port=0, local_hostname=None, timeout=Undefined,
                 source_address=None): pass
    def __enter__(self): pass
    def __exit__(self, *args): pass
    def set_debuglevel(self, debuglevel): pass
    sock = Undefined(Any)
    def connect(self, host='', port=0, source_address=None): pass
    def send(self, s): pass
    def putcmd(self, cmd, args=''): pass
    def getreply(self): pass
    def docmd(self, cmd, args=''): pass
    def helo(self, name=''): pass
    def ehlo(self, name=''): pass
    def has_extn(self, opt): pass
    def help(self, args=''): pass
    def rset(self): pass
    def noop(self): pass
    def mail(self, sender, options=Undefined): pass
    def rcpt(self, recip, options=Undefined): pass
    def data(self, msg): pass
    def verify(self, address): pass
    vrfy = Undefined(Any)
    def expn(self, address): pass
    def ehlo_or_helo_if_needed(self): pass
    def login(self, user, password): pass
    def starttls(self, keyfile=None, certfile=None, context=None): pass
    def sendmail(self, from_addr, to_addrs, msg, mail_options=Undefined,
                 rcpt_options=Undefined): pass
    def send_message(self, msg, from_addr=None, to_addrs=None, mail_options=Undefined,
                     rcpt_options=Undefined): pass
    def close(self): pass
    def quit(self): pass

class SMTP_SSL(SMTP):
    default_port = Undefined(Any)
    keyfile = Undefined(Any)
    certfile = Undefined(Any)
    context = Undefined(Any)
    def __init__(self, host='', port=0, local_hostname=None, keyfile=None, certfile=None,
                 timeout=Undefined, source_address=None, context=None): pass

class LMTP(SMTP):
    ehlo_msg = Undefined(Any)
    def __init__(self, host='', port=Undefined, local_hostname=None, source_address=None): pass
    sock = Undefined(Any)
    file = Undefined(Any)
    def connect(self, host='', port=0, source_address=None): pass
