View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Clotho Advanced Media > CAM-EmailTemplate-SMTP > CAM::EmailTemplate::SMTP



Annotate this POD

View/Report Bugs
Module Version: 0.91   Source  


CAM::EmailTemplate::SMTP - Net::SMTP based email message sender


Copyright 2005 Clotho Advanced Media, Inc., <>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


  use CAM::EmailTemplate::SMTP;
  my $template = new CAM::EmailTemplate::SMTP($filename);
  $template->setParams(recipient => '',
                       bar => "baz", kelp => "green");
  if ($template->send()) {
     print "Sent.";
  } else {
     print "Doh!  " . $template->{sendError};


This package is exactly like CAM::EmailTemplate except that it uses the Perl Net::SMTP package to deliver mail instead of a local sendmail executable.

To accomplish this, the programmer must configure the mailhost before attempting to send.

See README for a comparison with other CPAN modules.


setHost HOST

Create a new template object. The parameters are the same as the CAM::Template constructor.

This can be called as a class method or an instance method. If used as a class method, all subsequent instances use the specified host. If used as an instance method, the host only applies to this one instance.

deliver MSG

Delivers the message. This function assumes that the message is properly formatted.

This method overrides the deliver() method in CAM::EmailTemplate, implementing the Net::SMTP functionality.


Clotho Advanced Media Inc.,

Primary developer: Chris Dolan

syntax highlighting: