View source on GitHub |
Sends email on behalf of the application.
This module provides functions for application developers to provide email services for their applications. The module also provides a few utility methods.
Classes
class AdminEmailMessage
: Interface that sends email messages to all administrators via the Mail API.
class Attachment
: Attachment object.
class BounceNotification
: Encapsulates a bounce notification received by the application.
class EmailMessage
: Main interface to the Mail API service.
class EncodedPayload
: Wrapper for a payload that contains encoding information.
class Error
: Base Mail error type.
class InboundEmailMessage
: Receives a parsed email as it is recevied from an external source.
class InvalidAttachmentTypeError
: The file type of the attachment is invalid.
class InvalidEmailError
: The specified email is invalid.
class InvalidHeaderNameError
: The header name is invalid.
class InvalidSenderError
: The sender is not permitted to send mail for this application.
class MissingBodyError
: A body was not specified in the message.
class MissingRecipientsError
: A recipient was not specified in the message.
class MissingSenderError
: A sender was not specified in the message.
class MissingSubjectError
: The subject was not specified in the message.
class PayloadEncodingError
: The payload encoding is unknown.
class UnknownCharsetError
: The character set is unknown.
class UnknownEncodingError
: The encoding is unknown.
Functions
CheckEmailValid(...)
: Verifies whether an email is valid.
InvalidEmailReason(...)
: Determines the reason why an email is invalid.
IsEmailValid(...)
: Determines whether an email address is invalid.
MailMessageToMIMEMessage(...)
: Generates a MIMEMultipart
message from a MailMessage
protocol buffer.
SendMail(...)
: Sends mail on behalf of the application.
SendMailToAdmins(...)
: Sends email to administrators on behalf of the application.
check_email_valid(...)
: Verifies whether an email is valid.
check_headers_valid(...)
: Checks that headers
is a valid dictionary for a header.
invalid_email_reason(...)
: Determines the reason why an email is invalid.
invalid_headers_reason(...)
: Determines the reason why a header is invalid.
is_ascii(...)
: Returns whether a string is in ASCII.
is_email_valid(...)
: Determines whether an email address is invalid.
mail_message_to_mime_message(...)
: Generates a MIMEMultipart
message from a MailMessage
protocol buffer.
send_mail(...)
: Sends mail on behalf of the application.
send_mail_to_admins(...)
: Sends email to administrators on behalf of the application.