Service
class Service (View source)
Properties
protected Application | $app | ||
protected TransportInterface | $transport | ||
protected | $headers | ||
protected | $to | ||
protected | $replyto | ||
protected | $cc | ||
protected | $bcc | ||
protected | $from | ||
protected | $data | ||
protected | $subject | ||
protected | $attachments | ||
protected | $template | ||
protected | $body | ||
protected | $bodyHTML | ||
protected | $testing |
Methods
this method is called by the Loader::helper to clean up the instance of this object resets the class scope variables.
Adds a parameter to a mail template.
Add a mail attachment by specifying its raw binary data.
Loads an email template from the /mail/ directory.
Manually set the text body of a mail message, typically the body is set in the template + load method.
Manually set the message's subject.
Returns the message's subject.
Returns the message's text body.
Returns the message's html body.
manually set the HTML portion of a MIME encoded message, can also be done by setting $bodyHTML in a mail template.
No description
No description
Sets the from address on the email about to be sent out.
Sets to the to email address on the email about to be sent out.
Adds an email address to the cc field on the email about to be sent out.
Adds an email address to the bcc field on the email about to be sent out.
No description
Set the testing state (if true the email logging never occurs and sending errors will throw an exception)
Retrieve the testing state
Set additional headers.
Sends the email.
Details
__construct(Application $app, TransportInterface $transport)
No description
reset()
this method is called by the Loader::helper to clean up the instance of this object resets the class scope variables.
addParameter(string $key, mixed $val)
Adds a parameter to a mail template.
addAttachment(File $file)
Add a File entity as a mail attachment.
addRawAttachment(string $content, string $filename, string $mimetype = 'application/octet-stream')
Add a mail attachment by specifying its raw binary data.
load(string $template, string $pkgHandle = null)
Loads an email template from the /mail/ directory.
setBody(string|false $body)
Manually set the text body of a mail message, typically the body is set in the template + load method.
setSubject(string $subject)
Manually set the message's subject.
string
getSubject()
Returns the message's subject.
string|false
getBody()
Returns the message's text body.
string|false
getBodyHTML()
Returns the message's html body.
setBodyHTML(string|false $html)
manually set the HTML portion of a MIME encoded message, can also be done by setting $bodyHTML in a mail template.
enableMailResponseProcessing(MailImporter $importer, array $data)
No description
protected string
generateEmailStrings(array $arr)
No description
from(string $email, string $name = null)
Sets the from address on the email about to be sent out.
to(string $email, string $name = null)
Sets to the to email address on the email about to be sent out.
cc(string $email, string $name = null)
Adds an email address to the cc field on the email about to be sent out.
bcc(string $email, string $name = null)
Adds an email address to the bcc field on the email about to be sent out.
replyto($email, $name = null)
No description
setTesting(bool $testing)
Set the testing state (if true the email logging never occurs and sending errors will throw an exception)
bool
getTesting()
Retrieve the testing state
setAdditionalHeaders(array $headers)
Set additional headers.
bool
sendMail(bool $resetData = true)
Sends the email.
static
getMailerObject()
deprecated
deprecated
No description