The mail package
Introduction
Package mail provides the means of sending email from an
App Engine application.
Example:
msg := &mail.Message{
Sender: "romeo@montague.com",
To: []string{"Juliet <juliet@capulet.org>"},
Subject: "See you tonight",
Body: "Don't forget our plans. Hark, 'til later.",
}
if err := mail.Send(c, msg); err != nil {
c.Errorf("Alas, my user, the email failed to sendeth: %v", err)
}
Functions
- func Send
-
func Send(c appengine.Context, msg *Message) os.Error
Send sends an email message.
Types
- type Attachment
An Attachment represents an email attachment.
-
type Attachment struct {
Name string
Data []byte
}
- type Message
A Message represents an email message.
Addresses may be of any form permitted by RFC 822.
-
type Message struct {
Sender string
ReplyTo string
To, Cc, Bcc []string
Subject string
Body string
Attachments []Attachment
}