class documentation
class ESMTPSenderFactory(SMTPSenderFactory): (source)
Constructor: ESMTPSenderFactory(username, password, fromEmail, toEmail, ...)
Utility factory for sending emails easily.
Method | __init__ |
No summary |
Method | build |
Build an ESMTPSender protocol configured with heloFallback, requireAuthentication, and requireTransportSecurity as specified in __init__ . |
Instance Variable | current |
The current running protocol as made by buildProtocol . |
Instance Variable | password |
Undocumented |
Instance Variable | username |
Undocumented |
Instance Variable | _context |
Undocumented |
Instance Variable | _helo |
Undocumented |
Instance Variable | _hostname |
Undocumented |
Instance Variable | _require |
Undocumented |
Instance Variable | _require |
Undocumented |
Inherited from SMTPSenderFactory
:
Method | client |
Called when a connection has failed to connect. |
Method | client |
Called when an established connection is lost. |
Instance Variable | file |
Undocumented |
Instance Variable | from |
Undocumented |
Instance Variable | n |
Undocumented |
Instance Variable | result |
Undocumented |
Instance Variable | retries |
Undocumented |
Instance Variable | send |
When the value is set to True, it means the message has been sent or there has been an unrecoverable error or the sending has been cancelled. The default value is False. |
Instance Variable | timeout |
Undocumented |
Instance Variable | to |
Undocumented |
Method | _process |
Undocumented |
Method | _remove |
Undocumented |
Method | _remove |
Remove the protocol created in buildProtocol. |
Inherited from ClientFactory
(via SMTPSenderFactory
):
Method | started |
Called when a connection has been started. |
Inherited from Factory
(via SMTPSenderFactory
, ClientFactory
):
Class Method | for |
Create a factory for the given protocol. |
Method | do |
Make sure startFactory is called. |
Method | do |
Make sure stopFactory is called. |
Method | log |
Describe this factory for log messages. |
Method | start |
This will be called before I begin listening on a Port or Connector. |
Method | stop |
This will be called before I stop listening on all Ports/Connectors. |
Class Variable | noisy |
Undocumented |
Class Variable | protocol |
Undocumented |
Instance Variable | num |
Undocumented |
def __init__(self, username, password, fromEmail, toEmail, file, deferred, retries=5, timeout=None, contextFactory=None, heloFallback=False, requireAuthentication=True, requireTransportSecurity=True, hostname=None):
(source)
¶
Parameters | |
username | Undocumented |
password | Undocumented |
from | The RFC 2821 address from which to send this message. |
to | A sequence of RFC 2821 addresses to which to send this message. |
file | A file-like object containing the message to send. |
deferred:defer.Deferred | A Deferred to callback or errback when sending of this message completes. |
retries | The number of times to retry delivery of this message. |
timeout | Period, in seconds, for which to wait for server responses, or None to wait forever. |
context | Undocumented |
helo | Undocumented |
require | Undocumented |
require | Undocumented |
hostname | Undocumented |
Build an ESMTPSender
protocol configured with heloFallback, requireAuthentication, and requireTransportSecurity as specified in __init__
.
This sets currentProtocol
on the factory, as well as returning it.
Returns | |
ESMTPSender | Undocumented |