mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
@@ -17,6 +17,7 @@ bCRLF: bytes
|
||||
OLDSTYLE_AUTH: Pattern[str]
|
||||
|
||||
class SMTPException(OSError): ...
|
||||
class SMTPNotSupportedError(SMTPException): ...
|
||||
class SMTPServerDisconnected(SMTPException): ...
|
||||
|
||||
class SMTPResponseException(SMTPException):
|
||||
@@ -53,12 +54,13 @@ class _AuthObject(Protocol):
|
||||
|
||||
class SMTP:
|
||||
debuglevel: int = ...
|
||||
sock: Optional[socket] = ...
|
||||
# Type of file should match what socket.makefile() returns
|
||||
file: Any = ...
|
||||
file: Optional[Any] = ...
|
||||
helo_resp: Optional[bytes] = ...
|
||||
ehlo_msg: str = ...
|
||||
ehlo_resp: Optional[bytes] = ...
|
||||
does_esmtp: int = ...
|
||||
does_esmtp: bool = ...
|
||||
default_port: int = ...
|
||||
timeout: float
|
||||
esmtp_features: Dict[str, str]
|
||||
@@ -73,7 +75,6 @@ class SMTP:
|
||||
exc_value: Optional[BaseException],
|
||||
tb: Optional[TracebackType]) -> None: ...
|
||||
def set_debuglevel(self, debuglevel: int) -> None: ...
|
||||
sock: Optional[socket]
|
||||
def connect(self, host: str = ..., port: int = ...,
|
||||
source_address: Optional[_SourceAddress] = ...) -> _Reply: ...
|
||||
def send(self, s: Union[bytes, str]) -> None: ...
|
||||
@@ -116,6 +117,7 @@ class SMTP:
|
||||
def quit(self) -> _Reply: ...
|
||||
|
||||
class SMTP_SSL(SMTP):
|
||||
default_port: int = ...
|
||||
keyfile: Optional[str]
|
||||
certfile: Optional[str]
|
||||
context: SSLContext
|
||||
|
||||
Reference in New Issue
Block a user