The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mail::SendGrid - interface to SendGrid.com mail gateway APIs

VERSION

version 0.02

SYNOPSIS

 use Mail::SendGrid;
 
 $sendgrid = Mail::SendGrid->new('api_user' => '...', 'api_key' => '...');
 print "Email to the following addresses bounced:\n";
 foreach my $bounce ($sendgrid->bounces)
 {
     print "\t", $bounce->email, "\n";
 }

DESCRIPTION

This module provides easy access to the APIs provided by sendgrid.com, a service for sending emails. At the moment the module just provides the bounces() method. Over time I'll add more of the SendGrid API.

METHODS

new

Takes two parameters, api_user and api_key, which were specified when you registered your account with SendGrid. These are required.

bounces

This requests all outstanding bounces from SendGrid, and returns a list of Mail::SendGrid::Bounce objects.

SEE ALSO

Mail::SendGrid::Bounce

The class which defines the data objects returned by the bounces method.

SendGrid API documentation

http://docs.sendgrid.com/documentation/api/web-api/webapibounces/

AUTHOR

Neil Bowers <neilb@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Neil Bowers <neilb@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.