sion;
our $VERSION = 'v0.900.1'; # VERSION
use v5.10.1;
use strict;
use warnings;
use Carp;
use JSON;
use HTTP::Tiny;
use constant DEFAULT_ENDPOINT => 'https://api.sendgrid.com/v3/mail/send';
use
keep_alive => 0,
default_headers => {
'Content-Type' => 'application/json',
'Authorization' => "Bearer $api_key",
},
);
my $response = $http->
{data}{mail_settings}{sandbox_mode} = { enable => JSON::true };
return $self->send(%args);
}
sub _payload {
my ($self) = @_;
return JSON->new->utf8->canonical->encode( $self->{data} );
}