• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""
2Various exceptions that are specific to the SES module.
3"""
4from boto.exception import BotoServerError
5
6
7class SESError(BotoServerError):
8    """
9    Sub-class all SES-related errors from here. Don't raise this error
10    directly from anywhere. The only thing this gets us is the ability to
11    catch SESErrors separately from the more generic, top-level
12    BotoServerError exception.
13    """
14    pass
15
16
17class SESAddressNotVerifiedError(SESError):
18    """
19    Raised when a "Reply-To" address has not been validated in SES yet.
20    """
21    pass
22
23
24class SESIdentityNotVerifiedError(SESError):
25    """
26    Raised when an identity (domain or address) has not been verified in SES yet.
27    """
28    pass
29
30
31class SESDomainNotConfirmedError(SESError):
32    """
33    """
34    pass
35
36
37class SESAddressBlacklistedError(SESError):
38    """
39    After you attempt to send mail to an address, and delivery repeatedly
40    fails, said address is blacklisted for at least 24 hours. The blacklisting
41    eventually expires, and you are able to attempt delivery again. If you
42    attempt to send mail to a blacklisted email, this is raised.
43    """
44    pass
45
46
47class SESDailyQuotaExceededError(SESError):
48    """
49    Your account's daily (rolling 24 hour total) allotment of outbound emails
50    has been exceeded.
51    """
52    pass
53
54
55class SESMaxSendingRateExceededError(SESError):
56    """
57    Your account's requests/second limit has been exceeded.
58    """
59    pass
60
61
62class SESDomainEndsWithDotError(SESError):
63    """
64    Recipient's email address' domain ends with a period/dot.
65    """
66    pass
67
68
69class SESLocalAddressCharacterError(SESError):
70    """
71    An address contained a control or whitespace character.
72    """
73    pass
74
75
76class SESIllegalAddressError(SESError):
77    """
78    Raised when an illegal address is encountered.
79    """
80    pass
81