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

40 statements  

1import enum 

2import os 

3from typing import Union 

4 

5 

6__all__ = ("Default", "SMTPStatus", "SocketPathType", "_default") 

7 

8SocketPathType = Union[str, bytes, os.PathLike[str]] 

9 

10 

11class Default(enum.Enum): 

12 """ 

13 Used for type hinting kwarg defaults. 

14 """ 

15 

16 token = 0 

17 

18 

19_default = Default.token 

20 

21 

22@enum.unique 

23class SMTPStatus(enum.IntEnum): 

24 """ 

25 Defines SMTP statuses for code readability. 

26 

27 See also: http://www.greenend.org.uk/rjk/tech/smtpreplies.html 

28 """ 

29 

30 invalid_response = -1 

31 system_status_ok = 211 

32 help_message = 214 

33 ready = 220 

34 closing = 221 

35 auth_successful = 235 

36 completed = 250 

37 will_forward = 251 

38 cannot_vrfy = 252 

39 auth_continue = 334 

40 start_input = 354 

41 domain_unavailable = 421 

42 mailbox_unavailable = 450 

43 error_processing = 451 

44 insufficient_storage = 452 

45 tls_not_available = 454 

46 unrecognized_command = 500 

47 unrecognized_parameters = 501 

48 command_not_implemented = 502 

49 bad_command_sequence = 503 

50 parameter_not_implemented = 504 

51 domain_does_not_accept_mail = 521 

52 access_denied = 530 # Sendmail specific 

53 auth_failed = 535 

54 mailbox_does_not_exist = 550 

55 user_not_local = 551 

56 storage_exceeded = 552 

57 mailbox_name_invalid = 553 

58 transaction_failed = 554 

59 syntax_error = 555