NAME
Dancer::Plugin::Email - Simple email handling for Dancer applications using Email::Stuff!
VERSION
version 0.01
SYNOPSIS
use Dancer;
use Dancer::Plugin::Email;
post '/contact' => sub {
email {
to => '...',
subject => '...',
message => $msg,
attachment => [
'/path/to/file' => 'filename'
]
};
};
Important Note! The default email format is html, this can be changed to text by seeting the option 'type' to 'text' in the config file or as a key/value in the hashref passed to the email keyword.
DESCRIPTION
Provides an easy way of handling text or html email messages with or without attachments. Simply define how you wish to send the email in your application's YAML configuration file, then call the email keyword passing the neccessary parameters as outlined above.
CONFIGURATION
Connection details will be taken from your Dancer application config file, and should be specified as, for example:
plugins:
Email:
driver: sendmail # must be an Email::Send driver
path: /usr/bin/sendmail # for Sendmail
host: localhost # for SMTP
from: me@website.com
AUTHOR
Al Newkirk <awncorp@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by awncorp.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.