CAM::EmailTemplate

"CAM" stands for Clotho Advanced Media, www.clotho.com, which
supported most of the development of this module.  Contact us at
cpan@clotho.com.

This module extends the CAM::Template search-and-replace API to with a
send() method to enable simplified delivery of automated but
customized emails.  This module is NOT intended for spam delivery (and
it's definitely not very efficient for that purpose).

Install via the usual:
  perl Makefile.PL
  make
  make test
  make install

To get the full effect of testing, please specify a recipient email
address:  setenv RECIPIENT user@foo.com

This module is released under the GNU Public License v2.  See
"COPYING" for details.

This module most closely resembles Mail::Send with the sendmail
option.  It has the following advantages:
  * Integration of templating
  * More readable code (IMHO)
and the following disadvantages:
  * Only supports sendmail delivery (but see also
    CAM::EmailTemplate::SMTP)
  * Doesn't offer an easy-to-understand API for building the header
  * Fewer mail delivery options

If you wish to take advantage of CAM::Template's ability to use a
custom template syntax, then you should create a new subclass that
inherits from buth your custom template and from this module.  A
simple example:

  package MyTemplate;
  use CAM::Template;
  our @ISA = qw(CAM::Template);
  
  sub patterns {
    my $pkg = shift;
    return {
      $pkg->SUPER::patterns(),
      # include syntax:  <? include("subfile.tmpl") ?>
      include => qr/<? *include\(\"([^\"]+)\"\) *?>/,
    };
  }

  package MyEmailTemplate;
  use MyTemplate;
  use CAM::EmailTemplate;
  our @ISA = qw(MyTemplate CAM::EmailTemplate);
