reviewboard.notifications.email.backend¶
E-mail backend for Review Board.
New in version 4.0.4.
- class SMTPConnectionMixin(*args, **kwargs)[source]¶
Bases:
object
Mixin for tracking last replies when sending e-mail over SMTP.
New in version 4.0.4.
- rb_last_reply¶
The last reply object. This contains the status code and reply details string.
- Type:
- data(*args, **kwargs) Tuple[int, bytes] [source]¶
Send message data over SMTP.
This will use the backend to send the data, and then store the last reply for further processing by
EmailBackend
.- Parameters:
- Returns:
The reply object. See
rb_last_reply
.- Return type:
- __annotations__ = {'rb_last_reply': typing.Optional[typing.Tuple[int, bytes]]}¶
- class SMTPConnection(*args, **kwargs)[source]¶
Bases:
SMTPConnectionMixin
,SMTP
SMTP connection with last-response tracking.
New in version 4.0.4.
- __annotations__ = {}¶
- class SMTPSSLConnection(*args, **kwargs)[source]¶
Bases:
SMTPConnectionMixin
,SMTP_SSL
SMTP SSL connection with last-response tracking.
New in version 4.0.4.
- __annotations__ = {}¶
- class EmailBackend(*args, **kwargs)[source]¶
Bases:
EmailBackend
Standard Review Board e-mail backend.
This is a specialization of Django’s e-mail backend that has enhanced support for mail services, Amazon SES in particular.
Amazon SES does not allow for custom Message IDs, and will return a generated Message ID as part of a
205 Ok
responses (which is not a standard part of the SMTP specifications). This backend has the ability to capture that Message ID and reassign it back to the message being sent for storage.Otherwise, the backend works exactly like the standard Django e-mail backend.
New in version 4.0.4.
- property connection_class: Union[Type[SMTPSSLConnection], Type[SMTPConnection]][source]¶
The SMTP connection class to use for communication.
This will be a version with last-response tracking enabled.
- Type: