Skip to content

An implementation of the Sendgrid API for the Mojolicious framework

License

Notifications You must be signed in to change notification settings

stefanadams/Mojo-Sendgrid

Repository files navigation

Mojo::Sendgrid

An implementation of the Sendgrid Web API v2 for the Mojolicious framework.

use 5.010;

use Mojo::Sendgrid;

my $sendgrid = Mojo::Sendgrid->new;
my $send = $sendgrid->mail(to=>q(x@y.com),from=>q(x@y.com),subject=>time,text=>time)->send;

$sendgrid->on(mail_send => sub {
  my ($sendgrid, $ua, $tx) = @_;
  say $tx->res->body;
});

Mojo::IOLoop->recurring(0.25 => sub {print'.'});

Mojo::IOLoop->start unless Mojo::IOLoop->is_running;

Installation

All you need is a one-liner, it takes less than a minute.

$ curl -L http://cpanmin.us | perl - https://github.com/s1037989/Mojo-Sendgrid/archive/master.tar.gz

We recommend the use of a Perlbrew environment.

Want to know more?

Take a look at our excellent documentation!

About

An implementation of the Sendgrid API for the Mojolicious framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages