Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/aiosmtplib/typing.py: 0%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1import enum
2import os
3from collections.abc import Awaitable, Callable
6__all__ = (
7 "Default",
8 "SMTPStatus",
9 "SMTPTokenGenerator",
10 "SocketPathType",
11 "_default",
12)
14SMTPTokenGenerator = Callable[[], Awaitable[str]]
16SocketPathType = str | bytes | os.PathLike[str]
19class Default(enum.Enum):
20 """
21 Used for type hinting kwarg defaults.
22 """
24 token = 0
27_default = Default.token
30@enum.unique
31class SMTPStatus(enum.IntEnum):
32 """
33 Defines SMTP statuses for code readability.
35 See also: http://www.greenend.org.uk/rjk/tech/smtpreplies.html
36 """
38 invalid_response = -1
39 system_status_ok = 211
40 help_message = 214
41 ready = 220
42 closing = 221
43 auth_successful = 235
44 completed = 250
45 will_forward = 251
46 cannot_vrfy = 252
47 auth_continue = 334
48 start_input = 354
49 domain_unavailable = 421
50 mailbox_unavailable = 450
51 error_processing = 451
52 insufficient_storage = 452
53 tls_not_available = 454
54 unrecognized_command = 500
55 unrecognized_parameters = 501
56 command_not_implemented = 502
57 bad_command_sequence = 503
58 parameter_not_implemented = 504
59 domain_does_not_accept_mail = 521
60 access_denied = 530 # Sendmail specific
61 auth_failed = 535
62 mailbox_does_not_exist = 550
63 user_not_local = 551
64 storage_exceeded = 552
65 mailbox_name_invalid = 553
66 transaction_failed = 554
67 syntax_error = 555