Package circuits :: Package lib :: Module smtp

Module smtp

Simple Mail Transfer Protocol

This module implements the Simple Mail Transfer Protocol or commonly known as SMTP.

Classes
  Raw
  Helo
  Mail
  Rcpt
  Data
  Rset
  Noop
  Quit
  Message
  SMTP
SMTP(event) -> new smtp object
Functions
lines, buffer
splitLines(s, buffer)
Append s to buffer and find any new lines of text in the string splitting at the standard IRC delimiter CRLF.
address
stripAddress(address)
Strip the leading & trailing <> from an address.
(host, fulladdress)
splitTo(address)
Return 'address' as undressed (host, fulladdress) tuple.
 
getAddress(keyword, arg)
Variables
  LINESEP = re.compile(r'\r?\n')
  __package__ = 'circuits.lib'
Function Details

splitLines(s, buffer)

 

Append s to buffer and find any new lines of text in the string splitting at the standard IRC delimiter CRLF. Any new lines found, return them as a list and the remaining buffer for further processing.

Returns: lines, buffer

stripAddress(address)

 

Strip the leading & trailing <> from an address. Handy for getting FROM: addresses.

Returns: address

splitTo(address)

 

Return 'address' as undressed (host, fulladdress) tuple. Handy for use with TO: addresses.

Returns: (host, fulladdress)