Message
class Message extends BaseMessage (View source)
Allows users to send mail using the App Engine mail APIs.
Properties
protected | $message | from BaseMessage | |
static protected | $allowed_headers | from BaseMessage | |
static protected | $extension_denylist | from BaseMessage | |
static protected | $set_functions | from BaseMessage |
Methods
Send the pre-formed email from the Message object.
Returns the class variable $set_functions array, or the corresponding value in that array if a key is provided.
Adds an attachment to the Message object.
Checks that an email is valid using the mailparse extension if available.
Sets AMP HTML content for the email body. This field is optional. Setting AMP HTML body makes the email an AMP Email. Plain text or HTML may become fallback content depending on the email client used.
Adds a "bcc" address, or array of addresses, to the mail object.
Adds a "cc" address, or array of addresses, to the mail object.
Adds a "to" address, or array of addresses, to the mail object.
Clears all "bcc" addresses from the mail object.
Clears all "cc" addresses from the mail object.
Clear reply-to address from the mail object.
Clears all "to" addresses from the mail object.
Checks that an email input is either: - An array, and each array member is a valid email - A single valid email string And subsequently returns an array of the valid emails.
Details
at line 124
send()
Send the pre-formed email from the Message object.
at line 109
protected
getFunctionArray()
Returns the class variable $set_functions array, or the corresponding value in that array if a key is provided.
in BaseMessage at line 77
__construct(array $options = null)
Construct an instance of Message.
in BaseMessage at line 113
addAttachment(string $filename, mixed $data, string $content_id = null)
Adds an attachment to the Message object.
in BaseMessage at line 129
addAttachmentArray()
deprecated
deprecated
Adds an array of attachments to the Message object.
in BaseMessage at line 163
addAttachmentsArray()
Adds an array of attachments to the Message object.
in BaseMessage at line 198
addHeader(string $key, string $value)
Adds a header pair to the mail object.
in BaseMessage at line 215
addHeaderArray()
Adds an array of headers to the mail object.
in BaseMessage at line 243
protected bool
checkValidAttachment(string $filename)
Checks that an attachment is valid.
in BaseMessage at line 268
protected bool
checkValidEmail(string $email)
Checks that an email is valid using the mailparse extension if available.
in BaseMessage at line 288
protected bool
checkValidHeader(string $key, string $value)
Check validity of a header pair.
in BaseMessage at line 307
clearAttachments()
Clear all attachments from the mail object.
in BaseMessage at line 314
clearHeaders()
Clear all headers from the mail object.
in BaseMessage at line 327
protected
handleApplicationError()
Handles application errors generated by the RPC call.
in BaseMessage at line 355
setHtmlBody(string $text)
Sets HTML content for the email body.
in BaseMessage at line 372
setAmpHtmlBody(string $text)
Sets AMP HTML content for the email body. This field is optional. Setting AMP HTML body makes the email an AMP Email. Plain text or HTML may become fallback content depending on the email client used.
in BaseMessage at line 388
setReplyTo(string $email)
Sets a reply-to address for the mail object.
in BaseMessage at line 403
setSender(string $email)
Sets the sender for the mail object.
in BaseMessage at line 417
setSubject(string $subject)
Sets the subject for the mail object.
in BaseMessage at line 433
bool
setTextBody(string $text)
Sets plain text for the email body.
at line 38
addBcc(mixed $emails)
Adds a "bcc" address, or array of addresses, to the mail object.
at line 53
addCc(mixed $emails)
Adds a "cc" address, or array of addresses, to the mail object.
at line 68
addTo(mixed $emails)
Adds a "to" address, or array of addresses, to the mail object.
at line 78
clearBcc()
Clears all "bcc" addresses from the mail object.
at line 85
clearCc()
Clears all "cc" addresses from the mail object.
at line 92
clearReplyTo()
Clear reply-to address from the mail object.
at line 99
clearTo()
Clears all "to" addresses from the mail object.
at line 163
protected An
validEmailsArray($email_list, $err_str)
Checks that an email input is either: - An array, and each array member is a valid email - A single valid email string And subsequently returns an array of the valid emails.