Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.tests.utils.MockMailHost Class Reference
Inheritance diagram for CMFPlone.tests.utils.MockMailHost:
Inheritance graph
Collaboration diagram for CMFPlone.tests.utils.MockMailHost:
Collaboration graph

List of all members.

Public Member Functions

def __init__
def reset
def send
def secureSend
def validateSingleEmailAddress

Public Attributes


Detailed Description

A MailHost that collects messages instead of sending them.

Thanks to Rocky Burt for inspiration.

Definition at line 3 of file

Constructor & Destructor Documentation

Definition at line 9 of file

00010     def __init__(self, id):
00011         Base.__init__(self, id, smtp_notls=True)
00012         self.reset()

Here is the call graph for this function:

Member Function Documentation

Definition at line 13 of file

00014     def reset(self):
00015         self.messages = []

Here is the caller graph for this function:

def CMFPlone.tests.utils.MockMailHost.secureSend (   self,

Definition at line 19 of file

00020     def secureSend(self, message, mto, mfrom, **kwargs):
00021         kwargs['debug'] = True
00022         result = Base.secureSend(self, message=message, mto=mto, mfrom=mfrom, **kwargs)
00023         self.messages.append(result)

def CMFPlone.tests.utils.MockMailHost.send (   self,
  mto = None,
  mfrom = None,
  subject = None,
  encode = None 

Definition at line 16 of file

00017     def send(self, message, mto=None, mfrom=None, subject=None, encode=None):
00018         self.messages.append(message)

Definition at line 24 of file

00025     def validateSingleEmailAddress(self, address):
00026         return True # why not

Member Data Documentation

Definition at line 14 of file

The documentation for this class was generated from the following file: