Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



google/appengine/api/mail/AdminMessage.php

Table of Contents
Copyright 2007 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

\google\appengine\api\mail\AdminMessage

Package: Default
Allows users to send mail to application admins using the App Engine mail APIs.
Parent(s)
\google\appengine\api\mail\BaseMessage

Methods

method public __construct (array $options = null) : void
inherited

Construct an instance of Message.

Inherited from: \google\appengine\api\mail\BaseMessage::__construct()
Parameters
Name Type Description
$options array

Options for message content, key as per set_functions shown above, value to be set.

Throws
Exception Description
\InvalidArgumentException If the options variable passed was not an array, if an invalid option was set in the options array, or if a value to be set by the options array was invalid.
method public addAttachment (string $filename, mixed $data, string $content_id = null) : void
inherited

Adds an attachment to the Message object.

Inherited from: \google\appengine\api\mail\BaseMessage::addAttachment()
Parameters
Name Type Description
$filename string

Filename of the attachment.

$data mixed

File data of the attachment.

$content_id string

Optional Content-ID header value of the attachment. Must be enclosed by angle brackets (<>).

Throws
Exception Description
\InvalidArgumentException If the input is not an array or if the attachment type is invalid (i.e. the filename is not a string, or the file extension is blacklisted).
method public addAttachmentArray (array $attach_array) : void
inherited

Adds an array of attachments to the Message object.

Inherited from: \google\appengine\api\mail\BaseMessage::addAttachmentArray()
Parameters
Name Type Description
$attach_array array

Attachments as filename => data pairs. Example: array("filename.txt" => "This is the file contents.");

Throws
Exception Description
\InvalidArgumentException If the input is not an array or if the attachment type is invalid (i.e. the filename is not a string, or the file extension is blacklisted).
method public addAttachmentsArray (array $attach_array) : void
inherited

Adds an array of attachments to the Message object.

Inherited from: \google\appengine\api\mail\BaseMessage::addAttachmentsArray()
Parameters
Name Type Description
$attach_array array

Array of arrays that represent attachments. Each attachment array supports name, data, and (optionally) content_id keys. Example: [['name' => 'foo.jpg', 'data' => 'data', 'content_id' => ' ']]

Throws
Exception Description
\InvalidArgumentException If the input is not an array or if the attachment type is invalid (i.e. the filename is not a string, or the file extension is blacklisted).
method public addHeader (string $key, string $value) : void
inherited

Adds a header pair to the mail object.

Inherited from: \google\appengine\api\mail\BaseMessage::addHeader()
Parameters
Name Type Description
$key string

Header name (from the whitelist) to be added.

$value string

Header value to be added.

Throws
Exception Description
\InvalidArgumentException If the header is not on the whitelist, or if the header is invalid (i.e. not a string).
method public addHeaderArray (array $header_array) : void
inherited

Adds an array of headers to the mail object.

Inherited from: \google\appengine\api\mail\BaseMessage::addHeaderArray()
Parameters
Name Type Description
$header_array array

An array of headers.

Throws
Exception Description
\InvalidArgumentException If the input is not an array, or if headers are not on the whitelist, or if a header is invalid (i.e. not a string).
method public clearAttachments () : void
inherited

Clear all attachments from the mail object.

Inherited from: \google\appengine\api\mail\BaseMessage::clearAttachments()
method public clearHeaders () : void
inherited

Clear all headers from the mail object.

Inherited from: \google\appengine\api\mail\BaseMessage::clearHeaders()
method public send () : void

Send the pre-formed email from the Message object to application admins.

Throws
Exception Description
\InvalidArgumentException If a required field (sender, recipient [to, cc or bcc], subject, body [plain or html]) is missing, or if an ApplicationError was thrown by the RPC call due to an unauthorized sender, an invalid attachment type, or an invalid header name.
\RuntimeException If an ApplicationError was thrown by the RPC call due to an internal error or bad request.
\google\appengine\runtime\ApplicationError If there was an unknown error in the RPC call.
method public setHtmlBody (string $text) : void
inherited

Sets HTML content for the email body.

Inherited from: \google\appengine\api\mail\BaseMessage::setHtmlBody()
Parameters
Name Type Description
$text string

HTML to add.

Throws
Exception Description
\InvalidArgumentException If text is not a string.
method public setReplyTo (string $email) : void
inherited

Sets a reply-to address for the mail object.

Inherited from: \google\appengine\api\mail\BaseMessage::setReplyTo()
Parameters
Name Type Description
$email string

Reply-to address.

Throws
Exception Description
\InvalidArgumentException If the input reply-to address is an invalid email address.
method public setSender (string $email) : void
inherited

Sets the sender for the mail object.

Inherited from: \google\appengine\api\mail\BaseMessage::setSender()
Parameters
Name Type Description
$email string

Email of the sender.

Throws
Exception Description
\InvalidArgumentException If the input sender is an invalid email address.
method public setSubject (string $subject) : void
inherited

Sets the subject for the mail object.

Inherited from: \google\appengine\api\mail\BaseMessage::setSubject()
Parameters
Name Type Description
$subject string

Subject line.

Throws
Exception Description
\InvalidArgumentException If subject line is not a string.
method public setTextBody (string $text) : bool
inherited

Sets plain text for the email body.

Inherited from: \google\appengine\api\mail\BaseMessage::setTextBody()
Parameters
Name Type Description
$text string

Plain text to add.

Returns
Type Description
bool True if successful, false otherwise.
Throws
Exception Description
\InvalidArgumentException If text is not a string.
Documentation was generated by phpDocumentor 2.0.0a12 .