--- /dev/null
+from email.message import Message as _Message\r
+from typing import (\r
+ Any, AnyStr, Dict, Generic, List, Optional, Sequence, Tuple, Union,\r
+ Pattern)\r
+\r
+_Reply = Tuple[int, bytes]\r
+_SendErrs = Dict[str, _Reply]\r
+\r
+SMTP_PORT: int\r
+SMTP_SSL_PORT: int\r
+CRLF: str\r
+bCRLF: bytes\r
+\r
+OLDSTYLE_AUTH: Pattern[str]\r
+\r
+class SMTPException(OSError): ...\r
+class SMTPServerDisconnected(SMTPException): ...\r
+\r
+class SMTPResponseException(SMTPException):\r
+ smtp_code = ... # type: int\r
+ smtp_error = ... # type: Union[bytes, str]\r
+ args = ... # type: Union[Tuple[int, Union[bytes, str]], Tuple[int, bytes, str]]\r
+ def __init__(self, code: int, msg: Union[bytes, str]) -> None: ...\r
+\r
+class SMTPSenderRefused(SMTPResponseException):\r
+ smtp_code = ... # type: int\r
+ smtp_error = ... # type: bytes\r
+ sender = ... # type: str\r
+ args = ... # type: Tuple[int, bytes, str]\r
+ def __init__(self, code: int, msg: bytes, sender: str) -> None: ...\r
+\r
+class SMTPRecipientsRefused(SMTPException):\r
+ recipients = ... # type: _SendErrs\r
+ args = ... # type: Tuple[_SendErrs]\r
+ def __init__(self, recipients: _SendErrs) -> None: ...\r
+\r
+class SMTPDataError(SMTPResponseException): ...\r
+class SMTPConnectError(SMTPResponseException): ...\r
+class SMTPHeloError(SMTPResponseException): ...\r
+class SMTPAuthenticationError(SMTPResponseException): ...\r
+\r
+def quoteaddr(addrstring): ...\r
+def quotedata(data): ...\r
+\r
+class SMTP:\r
+ debuglevel = ... # type: int\r
+ file = ... # type: Any\r
+ helo_resp = ... # type: Any\r
+ ehlo_msg = ... # type: Any\r
+ ehlo_resp = ... # type: Any\r
+ does_esmtp = ... # type: Any\r
+ default_port = ... # type: Any\r
+ timeout = ... # type: float\r
+ esmtp_features = ... # type: Any\r
+ source_address = ... # type: Any\r
+ local_hostname = ... # type: Any\r
+ def __init__(self, host: str = ..., port: int = ...,\r
+ local_hostname: Optional[str] = ..., timeout: float = ...,\r
+ source_address: Tuple[str, int] = ...) -> None: ...\r
+ def __enter__(self): ...\r
+ def __exit__(self, *args): ...\r
+ def set_debuglevel(self, debuglevel: int) -> None: ...\r
+ sock = ... # type: Any\r
+ def connect(self, host=..., port=..., source_address=...): ...\r
+ def send(self, s): ...\r
+ def putcmd(self, cmd, args=...): ...\r
+ def getreply(self) -> _Reply: ...\r
+ def docmd(self, cmd, args=...): ...\r
+ def helo(self, name=...): ...\r
+ def ehlo(self, name=...): ...\r
+ def has_extn(self, opt): ...\r
+ def help(self, args=...): ...\r
+ def rset(self) -> _Reply: ...\r
+ def noop(self) -> _Reply: ...\r
+ def mail(self, sender: str, options: Sequence[str] = ...) -> _Reply: ...\r
+ def rcpt(self, recip: str, options: Sequence[str] = ...) -> _Reply: ...\r
+ def data(self, msg): ...\r
+ def verify(self, address): ...\r
+ vrfy = ... # type: Any\r
+ def expn(self, address): ...\r
+ def ehlo_or_helo_if_needed(self): ...\r
+ def login(self, user, password): ...\r
+ def starttls(self, keyfile=..., certfile=..., context=...): ...\r
+ def sendmail(self, from_addr: str, to_addrs: Union[str, Sequence[str]],\r
+ msg: Union[bytes, str], mail_options: Sequence[str] = ...,\r
+ rcpt_options: List[str] = ...) -> _SendErrs: ...\r
+ def send_message(self, msg: _Message, from_addr: Optional[str] = ...,\r
+ to_addrs: Optional[Union[str, Sequence[str]]] = ...,\r
+ mail_options: List[str] = ...,\r
+ rcpt_options: Sequence[str] = ...) -> _SendErrs: ...\r
+ def close(self): ...\r
+ def quit(self) -> _Reply: ...\r
+\r
+class SMTP_SSL(SMTP):\r
+ default_port = ... # type: Any\r
+ keyfile = ... # type: Any\r
+ certfile = ... # type: Any\r
+ context = ... # type: Any\r
+ def __init__(self, host=..., port=..., local_hostname=..., keyfile=..., certfile=...,\r
+ timeout=..., source_address=..., context=...): ...\r
+\r
+class LMTP(SMTP):\r
+ ehlo_msg = ... # type: Any\r
+ def __init__(self, host: str = ..., port: int = ...,\r
+ local_hostname: Optional[str] = ...,\r
+ source_address: Optional[Tuple[str, int]] = ...) -> None: ...\r
+ sock = ... # type: Any\r
+ file = ... # type: Any\r
+ def connect(self, host=..., port=..., source_address=...): ...\r