Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcusramberg/mojolicious-plugin-mailgun
https://github.com/marcusramberg/mojolicious-plugin-mailgun
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/marcusramberg/mojolicious-plugin-mailgun
- Owner: marcusramberg
- Created: 2017-05-13T13:25:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-01T10:10:03.000Z (about 6 years ago)
- Last Synced: 2024-12-21T11:51:29.238Z (26 days ago)
- Language: Perl
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
Mojolicious::Plugin::Mailgun - Easy Email sending with mailgunSYNOPSIS
# Mojolicious::Lite
plugin 'mailgun' => { mom => {
api_key => '123',
domain => 'mom.no',
}};# Mojolicious
$self->plugin(mailgun => { mom => {
site => {
api_key => '123',
domain => 'mom.no',
}});# in controller named params
$self->mailgun->send( mom => {
recipient => '[email protected]',
subject => 'use Perl or die;'
html => $html,
inline => { file => 'public/file.png' },
sub { my $self,$res = shift }, # receives a Mojo::Transaction from mailgun.
);DESCRIPTION
Provides a quick and easy way to send email using the Mailgun API with
support for multiple user agents.OPTIONS
Mojolicious::Plugin::Mailgun can be provided a hash of mailgun sites
with "api_key" and "domain", or it can read them directly from
$c->config->{mailgun} if not provided at load time.HELPERS
Mojolicious::Plugin::Mailgun implements one helper.mailgun->send <$site>, <\%post_options>, <$cb>
Send a mail with the mailgun API. This is just a thin wrapper around
Mojo::UserAgent to handle authentication settings. See the mailgun
sending documentation for more information about the supported arguments
to the post_options hash. This API can only be used non-blocking, so the
callback is required.
METHODS
Mojolicious::Plugin::Mailgun inherits all methods from
Mojolicious::Plugin and implements the following new ones."register"
$plugin->register;Register plugin hooks and helpers in Mojolicious application.
SEE ALSO
MojoliciousAUTHOR
Marcus RambergCOPYRIGHT & LICENSE
Copyright (C) 2017 by Marcus Ramberg.This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.