Package turbomail :: Module api :: Class Transport
[hide private]
[frames] | no frames]

Class Transport

source code

object --+
         |
        Transport
Known Subclasses:

Message delivery subsystem API.

A Transport can deliver messages towards their recipients with a specific method, e.g. SMTP. They don't care about delivery strategies like queing or batch submission.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
config_get(self, key, default=None, tm2_key=None)
Returns the value for the given key from the configuration.
source code
 
deliver(self, message) source code
 
stop(self)
Called by the manager before the transport instance is destroyed.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

config_get(self, key, default=None, tm2_key=None)

source code 

Returns the value for the given key from the configuration. If the value was not found, this method looks if old configuration option (specified in tm2_key) is used. If tm2_key was ommitted, it tries to calculate the old key from the new one by cutting out the 'smtp.' in the middle. If an old configuration key is used, a DeprecationWarning is issued. As a final fallback, the default value (default None) is returned.

stop(self)

source code 

Called by the manager before the transport instance is destroyed. The transport can do some final cleanups (like releasing external resources) here.