SendGrid
in package
Table of Contents
Constants
- VERSION = "1.0.0"
Properties
- $domain : mixed
- $endpoint : mixed
- $namespace : mixed
- $password : mixed
- $username : mixed
Methods
- __construct() : mixed
- send() : string
- send Send an email
- _arrayToUrlPart() : string
- _arrayToUrlPart Converts an array to a url friendly string
- _prepMessageData() : string
- _prepMessageData Takes the mail message and returns a url friendly querystring
Constants
VERSION
public
mixed
VERSION
= "1.0.0"
Properties
$domain
protected
mixed
$domain
= "https://sendgrid.com/"
$endpoint
protected
mixed
$endpoint
= "api/mail.send.json"
$namespace
protected
mixed
$namespace
= "SendGrid"
$password
protected
mixed
$password
$username
protected
mixed
$username
Methods
__construct()
public
__construct(mixed $username, mixed $password) : mixed
Parameters
- $username : mixed
- $password : mixed
send()
send Send an email
public
send(Mail $mail) : string
Parameters
- $mail : Mail
-
The message to send
Return values
string —the json response
_arrayToUrlPart()
_arrayToUrlPart Converts an array to a url friendly string
protected
_arrayToUrlPart(array<string|int, mixed> $array, string $token) : string
Parameters
- $array : array<string|int, mixed>
-
- the array to convert
- $token : string
-
- the name of parameter
Return values
string —- a url part that can be concatenated to a url request
_prepMessageData()
_prepMessageData Takes the mail message and returns a url friendly querystring
protected
_prepMessageData(Mail $mail) : string
Parameters
- $mail : Mail
-
[description]
Return values
string —- the data query string to be posted