Package pyzmail :: Package tests :: Module test_send :: Class SMTPServer
[hide private]
[frames] | no frames]

Class SMTPServer

source code

asyncore.dispatcher --+    
                      |    
       smtpd.SMTPServer --+
                          |
                         SMTPServer

Instance Methods [hide private]
 
__init__(self, localaddr, remoteaddr, received) source code
 
process_message(self, peer, mail_from, rcpt_to, data)
Override this abstract method to handle messages from the client.
source code

Inherited from smtpd.SMTPServer: handle_accept

Inherited from asyncore.dispatcher: __getattr__, __repr__, __str__, accept, add_channel, bind, close, connect, create_socket, del_channel, handle_close, handle_connect, handle_connect_event, handle_error, handle_expt, handle_expt_event, handle_read, handle_read_event, handle_write, handle_write_event, listen, log, log_info, readable, recv, send, set_reuse_addr, set_socket, writable

Class Variables [hide private]

Inherited from asyncore.dispatcher: accepting, addr, closing, connected, debug, ignore_log_types

Method Details [hide private]

__init__(self, localaddr, remoteaddr, received)
(Constructor)

source code 
Overrides: asyncore.dispatcher.__init__

process_message(self, peer, mail_from, rcpt_to, data)

source code 

Override this abstract method to handle messages from the client.

peer is a tuple containing (ipaddr, port) of the client that made the socket connection to our smtp port.

mailfrom is the raw address the client claims the message is coming from.

rcpttos is a list of raw addresses the client wishes to deliver the message to.

data is a string containing the entire full text of the message, headers (if supplied) and all. It has been `de-transparencied' according to RFC 821, Section 4.5.2. In other words, a line containing a `.' followed by other text has had the leading dot removed.

This function should return None, for a normal `250 Ok' response; otherwise it returns the desired response string in RFC 821 format.

Overrides: smtpd.SMTPServer.process_message
(inherited documentation)