NAME

CGI::Application::Plugin::Email - Lazy loaded Email

SYNOPSIS

Just a little wrapper around Email::Stuff. Useful to add easy emailing functionality without loading having to load the library unless it's actually called.

use CGI::Application::Plugin::Email qw( :std );

Creating a new Email::Stuff object:-

$email = $self->Email->new;

If you aren't happy with importing a method named Email into your namespace then you can choose the method name:-

use CGI::Application::Plugin::Email ( ':std', { method => 'EmailStuff' } );

Creating a new Email::Stuff object:-

$email = $self->EmailStuff->new;

DESCRIPTION

This module is a wrapper around Email::Stuff. The only real benefit is the lazy loading so that Email::Stuff isn't loaded with every request. This makes it a good option for scripts running through CGI.

Methods

Email

This is the object that gets exported. See "SYNOPSIS"

Export groups

Only an Email:::Stuff object can be exported. It's not exported by default, but this module is pretty useless without it. You can choose the name of the method that invokes the object.

:std exports:-

Email

FAQ

How do I send email?

View the Email::Stuff documentation on how to use the returned email object to send mail.

Why?

Emailing can be a pain, wanted a quick and easy way of doing it. Email::Stuff provides that, but I didn't want it slowing down my cgi requests that didn't actually use it. Also there were no CGI::Application plugins for sending email, so a plugin providing an easy path to emailing for new people seemed a good idea :)

Thanks to:-

Email::Stuff

Adam Kennedy for creating Email::Stuff and for making sure it had Pure Perl dependency options when I asked him :)

Come join the bestest Perl group in the World!

Bristol and Bath Perl moungers is renowned for being the friendliest Perl group in the world. You don't have to be from the UK to join, everyone is welcome on the list:- http://perl.bristolbath.org

AUTHOR

Lyle Hopkins ;)