ironcamel/Dancer-Plugin-Email — Issue #7: Asynchronous send?
Author: kalgan
Created: 2011-12-08 17:08:54+00:00
State: open

Before of all, thank you for this great plugin! :)

I have a suggestion to add an option to send emails asynchronously.
Now, when sending email, the server waits for completion.

I'm using for this [Proc::Simple::Async] (http://search.cpan.org/~berle/Proc-Simple-Async-0.03/lib/Proc/Simple/Async.pm), then this process will go into background:

```perl
use Dancer::Plugin::Email;
use Proc::Simple::Async;

get '/emailme' => sub
{

my $proc = async
{
my $msg = email {
from => 'robot@example.com',
to => 'user@example.com',
subject => 'Async email',
message => 'Hello!'
};
return $msg;
}
return 'message sent!';
};
```