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

Mojo::Sendgrid::Mail - Mail endpoint of the Sendgrid API implementation for the Mojolicious framework

VERSION

0.01

SYNOPSIS

  See L<Mojo::Sendgrid>

DESCRIPTION

Mojo::Sendgrid::Mail is the mail endpoint of the Sendgrid API and is non- blocking thanks to Mojo::IOLoop from the wonderful Mojolicious framework.

This class inherits from Mojo::Base.

EVENTS

mail_send

Emitted after a Sendgrid API response is received, if there are any subscribers.

ATTRIBUTES

to (required)

Email address of the recipients.

from (required)

Email address of the sender.

subject (required)

The subject of your email.

text (must include at least one of the text or html attributes)

The plain text content of your email message.

html (must include at least one of the text or html attributes)

The HTML content of your email message.

toname

Give a name to the recipient.

cc

Email address of the CC'd recipients.

ccname

This is the name appended to the cc field.

bcc

Email address of the BCC'd recipients.

bccname

This is the name appended to the bcc field.

fromname

This is the name appended to the from email field.

replyto

Append a reply-to field to your email message.

date

Specify the date header of your email.

files

Files to be attached.

content

Content IDs of the files to be used as inline images.

headers

A collection of key/value pairs in JSON format.

x_smtpapi

Please review the SMTP API to view documentation on what you can do with the JSON headers.

METHODS

send

  $self = $self->send;

Build the Web request to send and deliver an email using Sendgrid.

COPYRIGHT

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

AUTHOR

Stefan Adams - sadams@cpan.org