sharifulin/mojolicious-plugin-mail — Issue #2: Receiving mail
Author: kraih
Created: 2011-11-06 19:31:52+00:00
State: open

Hi,

Would be really nice if this plugin also offered a (default) way for receiving incoming mail.
One of the most popular setups these days seems to be a Postfix/Exim server that pipes all incoming mails to curl, which then performs a POST request against the web application with the whole mail attached as a url-encoded parameter.

Perhaps there could be a helper that checks for the presence of such a parameter and returns the parsed message.

post '/incoming_mail' => sub {
my $self = shift;

# Check basic auth or something
...

# Check for presence of message and render appropriate response (200, 404...)
my $parsed_mail = $self->mail('parameter_name');

# Process mail
...
};

Doesn't really have to be very sophisticated, but just having the whole process documented in a module like Mojolicious::Plugin::Mail would be awesome. :)