massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 3 / smtplib.pyi
1 from email.message import Message as _Message\r
2 from typing import (\r
3     Any, AnyStr, Dict, Generic, List, Optional, Sequence, Tuple, Union,\r
4     Pattern)\r
5 \r
6 _Reply = Tuple[int, bytes]\r
7 _SendErrs = Dict[str, _Reply]\r
8 \r
9 SMTP_PORT: int\r
10 SMTP_SSL_PORT: int\r
11 CRLF: str\r
12 bCRLF: bytes\r
13 \r
14 OLDSTYLE_AUTH: Pattern[str]\r
15 \r
16 class SMTPException(OSError): ...\r
17 class SMTPServerDisconnected(SMTPException): ...\r
18 \r
19 class SMTPResponseException(SMTPException):\r
20     smtp_code = ...  # type: int\r
21     smtp_error = ...  # type: Union[bytes, str]\r
22     args = ...  # type: Union[Tuple[int, Union[bytes, str]], Tuple[int, bytes, str]]\r
23     def __init__(self, code: int, msg: Union[bytes, str]) -> None: ...\r
24 \r
25 class SMTPSenderRefused(SMTPResponseException):\r
26     smtp_code = ...  # type: int\r
27     smtp_error = ...  # type: bytes\r
28     sender = ...  # type: str\r
29     args = ...  # type: Tuple[int, bytes, str]\r
30     def __init__(self, code: int, msg: bytes, sender: str) -> None: ...\r
31 \r
32 class SMTPRecipientsRefused(SMTPException):\r
33     recipients = ...  # type: _SendErrs\r
34     args = ...  # type: Tuple[_SendErrs]\r
35     def __init__(self, recipients: _SendErrs) -> None: ...\r
36 \r
37 class SMTPDataError(SMTPResponseException): ...\r
38 class SMTPConnectError(SMTPResponseException): ...\r
39 class SMTPHeloError(SMTPResponseException): ...\r
40 class SMTPAuthenticationError(SMTPResponseException): ...\r
41 \r
42 def quoteaddr(addrstring): ...\r
43 def quotedata(data): ...\r
44 \r
45 class SMTP:\r
46     debuglevel = ...  # type: int\r
47     file = ...  # type: Any\r
48     helo_resp = ...  # type: Any\r
49     ehlo_msg = ...  # type: Any\r
50     ehlo_resp = ...  # type: Any\r
51     does_esmtp = ...  # type: Any\r
52     default_port = ...  # type: Any\r
53     timeout = ...  # type: float\r
54     esmtp_features = ...  # type: Any\r
55     source_address = ...  # type: Any\r
56     local_hostname = ...  # type: Any\r
57     def __init__(self, host: str = ..., port: int = ...,\r
58                  local_hostname: Optional[str] = ..., timeout: float = ...,\r
59                  source_address: Tuple[str, int] = ...) -> None: ...\r
60     def __enter__(self): ...\r
61     def __exit__(self, *args): ...\r
62     def set_debuglevel(self, debuglevel: int) -> None: ...\r
63     sock = ...  # type: Any\r
64     def connect(self, host=..., port=..., source_address=...): ...\r
65     def send(self, s): ...\r
66     def putcmd(self, cmd, args=...): ...\r
67     def getreply(self) -> _Reply: ...\r
68     def docmd(self, cmd, args=...): ...\r
69     def helo(self, name=...): ...\r
70     def ehlo(self, name=...): ...\r
71     def has_extn(self, opt): ...\r
72     def help(self, args=...): ...\r
73     def rset(self) -> _Reply: ...\r
74     def noop(self) -> _Reply: ...\r
75     def mail(self, sender: str, options: Sequence[str] = ...) -> _Reply: ...\r
76     def rcpt(self, recip: str, options: Sequence[str] = ...) -> _Reply: ...\r
77     def data(self, msg): ...\r
78     def verify(self, address): ...\r
79     vrfy = ...  # type: Any\r
80     def expn(self, address): ...\r
81     def ehlo_or_helo_if_needed(self): ...\r
82     def login(self, user, password): ...\r
83     def starttls(self, keyfile=..., certfile=..., context=...): ...\r
84     def sendmail(self, from_addr: str, to_addrs: Union[str, Sequence[str]],\r
85                  msg: Union[bytes, str], mail_options: Sequence[str] = ...,\r
86                  rcpt_options: List[str] = ...) -> _SendErrs: ...\r
87     def send_message(self, msg: _Message, from_addr: Optional[str] = ...,\r
88                      to_addrs: Optional[Union[str, Sequence[str]]] = ...,\r
89                      mail_options: List[str] = ...,\r
90                      rcpt_options: Sequence[str] = ...) -> _SendErrs: ...\r
91     def close(self): ...\r
92     def quit(self) -> _Reply: ...\r
93 \r
94 class SMTP_SSL(SMTP):\r
95     default_port = ...  # type: Any\r
96     keyfile = ...  # type: Any\r
97     certfile = ...  # type: Any\r
98     context = ...  # type: Any\r
99     def __init__(self, host=..., port=..., local_hostname=..., keyfile=..., certfile=...,\r
100                  timeout=..., source_address=..., context=...): ...\r
101 \r
102 class LMTP(SMTP):\r
103     ehlo_msg = ...  # type: Any\r
104     def __init__(self, host: str = ..., port: int = ...,\r
105                  local_hostname: Optional[str] = ...,\r
106                  source_address: Optional[Tuple[str, int]] = ...) -> None: ...\r
107     sock = ...  # type: Any\r
108     file = ...  # type: Any\r
109     def connect(self, host=..., port=..., source_address=...): ...\r