Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScheduleSend ¶
ScheduleSend schedules an email to be sent asynchronously by the default task queue. This function uses the default Sender configured for the website.
Types ¶
type Attachment ¶
type Attachment struct {
// Content embeds the attachment data. The value must be base64-encoded.
Content `json:"content"`
// Filename is the name of the file to show with the attachment.
Filename string `json:"filename"`
// Disposition specifies how the attachment is included in the email.
// A value may be either "inline" or "attachment"; the default, if this field
// is left blank, is "attachment".
Disposition string `json:"disposition"`
}
An Attachment is an email attachment.
type Content ¶
type Content struct {
// Type is the mime type of the content (for example, "text/plain").
Type string `json:"type"`
// Value is the content data.
Value string `json:"value"`
}
A Content is piece of the content of an email body. Each email must have at least one Content.
func (*Content) MarshalJSON ¶
MarshalJSON implements json.Marshaler. The error is always nil.
type Copies ¶
A Copies contains additional recipients to be copied on an email.
func (Copies) MarshalJSON ¶
MarshalJSON implements json.Marshaler. The error is always nil.
type Email ¶
type Email struct {
To Party `json:"to"`
From Party `json:"from"`
ReplyTo Party `json:"reply_to"`
Subject string `json:"subject"`
Contents []Content `json:"contents"`
}
An Email represents all the basic settings we use to send emails from the server.
func NewEmail ¶
NewEmail constructs an Email, setting only the fields that are absolutely required. The mime type of the content is set to text/plain.
func (*Email) MarshalJSON ¶
MarshalJSON implements json.Marshaler. The error is always nil.
type Party ¶
A Party is a sender or a receiver of an email.
func (*Party) MarshalJSON ¶
MarshalJSON implements json.Marshaler. The error is always nil.