Classes

bbcflib::email Namespace Reference

Classes

class  EmailReport

Detailed Description

=====================
Module: bbcflib.email
=====================

This module provides an simple way to set up and send emails, possibly
configuring the subject, sender, and SMTP server via an external
configuration file.  The standard usage is to create an
``EmailReport`` object::

    r = EmailReport(sender='nobody@localhost',
                    to='boris@localhost',
                    subject='Default Subject',
                    smtp_server='localhost')

then append lines to its body::

    r.appendBody("This is some text.")

and finally call the ``send`` method to dispatch the email.::

    r.send()

The ``EmailReport`` object can also be created referring to a
``ConfigParser``, though the *to* field must still be specified.  With
a ``ConfigParser`` object ``cp``, we would create an ``EmailReport``
with::

    r = EmailReport(config=cp, to='boris@localhost')

.. autoclass:: EmailReport
 All Classes Namespaces Functions