sharifulin / mojolicious-plugin-mail Goto Github PK
View Code? Open in Web Editor NEWMojolcious plugin for send mail
Home Page: http://search.cpan.org/dist/Mojolicious-Plugin-Mail/
Mojolcious plugin for send mail
Home Page: http://search.cpan.org/dist/Mojolicious-Plugin-Mail/
In the documentation, may be here:
https://github.com/sharifulin/mojolicious-plugin-mail/blob/master/lib/Mojolicious/Plugin/Mail.pm#L223
Please add credentials parameters, namely
mail => {
To => '[email protected]',
Subject => 'Test',
AuthUser => 'username',
AuthPass => 'password',
Data => 'use Perl or die;',
},
...
This way users will know where to pass authentication data when sending emails.
Thanks
As you use render_to_string
the minimum required version of Mojolicious is 5.0.
Hi,
Here's a little wishlist item, wouldn't it be 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 mail.
post '/incoming_mail' => sub {
my $self = shift;
# Check basic auth or something
...
# Check for presence of mail parameter and render appropriate response (200, 404...)
return unless 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. :)
Суть такова:
Плагин подключен как :
$self->plugin(mail => {
from => '[email protected]',
encoding => 'base64',
how => 'sendmail',
howargs => [ '/usr/sbin/sendmail -t' ],
});
Вызывается в контроллере :
$self->mail(to => $params->{user_email}, template => 'mail/registration', format => 'mail', user=>$result);
В шаблоне русский текст, шаблон в utf8;
Все это на линуксе, локаль которого тоже utf8
Mojo, MIME::Lite и Mojolicious::Plugin::Mail последние с cpan.
2263: /^BASE64/ and do {
2264: $out->print( encode_base64( $self->{Data} ) );
2265: last DATA;
2266: };
M::P::Mail delete stash data, which mess up the session store:
https://github.com/sharifulin/mojolicious-plugin-mail/blob/master/lib/Mojolicious/Plugin/Mail.pm#L66
Why do you delete all of those keys from the stash? I think you should consider all the "mojo.x" keys internal and don't mess around with them.
Because this plugin relies on MIME::Lite, it allows neither to send messages with STARTTLS nor with SSL/TLS. In our area, it gets more or less impossible to send messages with standard smtp. Any ideas how we could solve this?
Rolf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.