Package mailer :: Module mailer :: Class Mailer
[hide private]

Class Mailer

source code


Represents an SMTP connection.

Use login() to log in with a username and password.

Instance Methods [hide private]
 
__init__(self, host='localhost', port=0)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
login(self, usr, pwd) source code
 
send(self, msg)
Send one message or a sequence of messages.
source code
 
_send(self, server, msg)
Sends a single message using the server we created in send()
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, host='localhost', port=0)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

send(self, msg)

source code 

Send one message or a sequence of messages.

Every time you call send, the mailer creates a new connection, so if you have several emails to send, pass them as a list: mailer.send([msg1, msg2, msg3])