Group
Extension

Matches 2

SendGrid ( T/TJ/TJENKINS/SendGrid-1.3.tar.gz, TJENKINS, 2015; MetaCPAN )
SendGrid/lib/Email/SendGrid/Header.pm ( view source; MetaCPAN )
package Email::SendGrid::Header;

use strict;

use JSON;
use MIME::Entity;

sub new
{
  my $class = shift;

  my $self = bless { 'data' => { },
                     @_
                   }, $class;

 
, $self->asJSON());
  $mime->head->fold('x-smtpapi');
}

sub asJSON
{
  my $self = shift;
  my %args = @_;

  my $json = JSON->new;
  $json->space_before(1);
  $json->space_after(1);
  $json->ascii(1)
;
  my $str = $json->encode($self->{data});
  if ( $args{fold} )
  {
    my $length = $args{fold};

    $str =~ s/(.{1,$length})(\s)/$1\n$2/g;
  }

  return $str;
}

=head1 NAME

Email::SendGrid::Head
SendGrid ( T/TJ/TJENKINS/SendGrid-1.3.tar.gz, TJENKINS, 2015; MetaCPAN )
SendGrid/lib/Email/SendGrid/Transport/REST.pm ( view source; MetaCPAN )
$VERSION = '1.3';

use LWP::UserAgent;
use Mail::Address;
use Sys::Hostname;
use URI::Escape;
use JSON;
use Encode;
use Carp;
use English qw( -no_match_vars ); 
use Data::Dumper qw(Dumper);

sub new
{


  my $self = bless { server => 'api.sendgrid.com',
                     path => '/api/mail.send.json',
                     timeout => 30,
                     @_,
                    }, $class;

  
te=" . uri_escape($date) if ( defined($date) );

  # smtp api header
  my $hdr = $sg->header()->asJSON();
  $hdr = encode($charset, $hdr) if ( utf8::is_utf8($hdr) );

  $query .= "&x-smtpapi=" . uri_e

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.