Methods

setData()

setData(array  $data) : \Charcoal\Email\Email

Set the email's data.

Parameters

array $data

The data to set.

Returns

\Charcoal\Email\Email

Chainable

setCampaign()

setCampaign(string  $campaign) : \Charcoal\Email\EmailInterface

Set the campaign ID.

Parameters

string $campaign

The campaign identifier.

Returns

\Charcoal\Email\EmailInterface

Chainable

campaign()

campaign() : string

Get the campaign identifier.

Returns

string

setTo()

setTo(string|array  $email) : \Charcoal\Email\EmailInterface

Set the recipient email address(es).

Parameters

string|array $email

The recipient email address(es).

Returns

\Charcoal\Email\EmailInterface

Chainable

addTo()

addTo(mixed  $email) : \Charcoal\Email\EmailInterface

Add a recipient email address.

Parameters

mixed $email

The recipient email address to add.

Returns

\Charcoal\Email\EmailInterface

Chainable

to()

to() : array<mixed,string>

Get the recipient's email address.

Returns

array<mixed,string>

setCc()

setCc(string|array  $email) : \Charcoal\Email\EmailInterface

Set the carbon copy (CC) recipient email address(es).

Parameters

string|array $email

The CC recipient email address(es).

Returns

\Charcoal\Email\EmailInterface

Chainable

addCc()

addCc(mixed  $email) : \Charcoal\Email\EmailInterface

Add a CC recipient email address.

Parameters

mixed $email

The CC recipient email address to add.

Returns

\Charcoal\Email\EmailInterface

Chainable

cc()

cc() : array<mixed,string>

Get the CC recipient's email address.

Returns

array<mixed,string>

setBcc()

setBcc(string|array  $email) : \Charcoal\Email\EmailInterface

Set the blind carbon copy (BCC) recipient email address(es).

Parameters

string|array $email

The BCC recipient email address(es).

Returns

\Charcoal\Email\EmailInterface

Chainable

addBcc()

addBcc(mixed  $email) : \Charcoal\Email\EmailInterface

Add a BCC recipient email address.

Parameters

mixed $email

The BCC recipient email address to add.

Returns

\Charcoal\Email\EmailInterface

Chainable

bcc()

bcc() : array<mixed,string>

Get the BCC recipient's email address.

Returns

array<mixed,string>

setFrom()

setFrom(string|array  $email) : \Charcoal\Email\EmailInterface

Set the sender's email address.

Parameters

string|array $email

An email address.

Returns

\Charcoal\Email\EmailInterface

Chainable

from()

from() : string

Get the sender's email address.

Returns

string

setReplyTo()

setReplyTo(mixed  $email) : \Charcoal\Email\EmailInterface

Set email address to reply to the message.

Parameters

mixed $email

The sender's "Reply-To" email address.

Returns

\Charcoal\Email\EmailInterface

Chainable

replyTo()

replyTo() : string

Get email address to reply to the message.

Returns

string

setSubject()

setSubject(string  $subject) : \Charcoal\Email\EmailInterface

Set the email subject.

Parameters

string $subject

The email subject.

Returns

\Charcoal\Email\EmailInterface

Chainable

subject()

subject() : string

Get the email subject.

Returns

string —

The emails' subject.

setMsgHtml()

setMsgHtml(string  $body) : \Charcoal\Email\EmailInterface

Set the email's HTML message body.

Parameters

string $body

The HTML message body.

Returns

\Charcoal\Email\EmailInterface

Chainable

msgHtml()

msgHtml() : string

Get the email's HTML message body.

Returns

string

setMsgTxt()

setMsgTxt(string  $body) : \Charcoal\Email\EmailInterface

Set the email's plain-text message body.

Parameters

string $body

The message's text body.

Returns

\Charcoal\Email\EmailInterface

Chainable

msgTxt()

msgTxt() : string

Get the email's plain-text message body.

Returns

string

setAttachments()

setAttachments(array  $attachments) : \Charcoal\Email\EmailInterface

Set the email's attachments.

Parameters

array $attachments

The file attachments.

Returns

\Charcoal\Email\EmailInterface

Chainable

addAttachment()

addAttachment(mixed  $attachment) : \Charcoal\Email\EmailInterface

Add an attachment to the email.

Parameters

mixed $attachment

A single file attachment.

Returns

\Charcoal\Email\EmailInterface

Chainable

attachments()

attachments() : array

Get the email's attachments.

Returns

array

setLog()

setLog(boolean  $log) : \Charcoal\Email\EmailInterface

Enable or disable logging for this particular email.

Parameters

boolean $log

The log flag.

Returns

\Charcoal\Email\EmailInterface

Chainable

log()

log() : boolean

Determine if logging is enabled for this particular email.

Returns

boolean

setTrack()

setTrack(boolean  $track) : \Charcoal\Email\EmailInterface

Enable or disable tracking for this particular email.

Parameters

boolean $track

The track flag.

Returns

\Charcoal\Email\EmailInterface

Chainable

track()

track() : boolean

Determine if tracking is enabled for this particular email.

Returns

boolean

send()

send() : boolean

Send the email to all recipients.

Returns

boolean —

Success / Failure.

queue()

queue(mixed  $ts = null) : boolean

Enqueue the email for each recipient.

Parameters

mixed $ts

A date/time to initiate the queue processing.

Returns

boolean —

Success / Failure.