class twisted.mail.mail.MailService(service.MultiService): (source)
An email service.
Instance Variable | queue | A queue for outgoing messages. |
Instance Variable | domains | A mapping of supported domain name to domain object. |
Instance Variable | portals | A mapping of domain name to authentication portal. |
Instance Variable | aliases | A mapping of domain name to alias. |
Instance Variable | smtpPortal | A portal for authentication for the SMTP server. |
Instance Variable | monitor | A service to monitor changes to files. |
Method | __init__ | Initialize the mail service. |
Method | getPOP3Factory | Create a POP3 protocol factory. |
Method | getSMTPFactory | Create an SMTP protocol factory. |
Method | getESMTPFactory | Create an ESMTP protocol factory. |
Method | addDomain | Add a domain for which the service will accept email. |
Method | setQueue | Set the queue for outgoing emails. |
Method | requestAvatar | Return a message delivery for an authenticated SMTP user. |
Method | lookupPortal | Find the portal for a domain. |
Method | defaultPortal | Return the portal for the default domain. |
Inherited from MultiService:
Instance Variable | services | Undocumented |
Instance Variable | namedServices | Undocumented |
Instance Variable | parent | An IServiceCollection which is the parent or None . |
Method | privilegedStartService | Do preparation work for starting the service. |
Method | startService | Start the service. |
Method | stopService | Stop the service. |
Method | getServiceNamed | Get the child service with a given name. |
Method | __iter__ | Get an iterator over all child services. |
Method | addService | Add a child service. |
Method | removeService | Remove a child service. |
Inherited from Service (via MultiService):
Instance Variable | running | A boolean which indicates whether the service is running. |
Instance Variable | name | A str which is the name of the service or None . |
Method | __getstate__ | Undocumented |
Method | setName | Set the name of the service. |
Method | setServiceParent | Set the parent of the service. This method is responsible for setting the parent attribute on this service (the child service). |
Method | disownServiceParent | Use this API to remove an IService from an IServiceCollection . |
Create a POP3 protocol factory.
Returns | A POP3 protocol factory. (type: POP3Factory ) |
Create an SMTP protocol factory.
Returns | An SMTP protocol factory. (type: SMTPFactory ) |
Create an ESMTP protocol factory.
Returns | An ESMTP protocol factory. (type: ESMTPFactory ) |
Set the queue for outgoing emails.
Parameters | queue | A queue for outgoing messages. (type: Queue ) |
Return a message delivery for an authenticated SMTP user.
Parameters | avatarId | A string which identifies an authenticated user. (type: bytes ) |
mind | Unused. (type: None ) | |
interfaces | A group of interfaces one of which the avatar must support. (type: n-tuple of zope.interface.Interface ) | |
Returns | A tuple of the supported interface, a message delivery, and a logout function. (type: 3-tuple of (1) IMessageDelivery , (2) ESMTPDomainDelivery , (3) no-argument callable) | |
Raises | NotImplementedError | When the given interfaces do not include IMessageDelivery . |