Documentation
¶
Overview ¶
Package mailcomposer opens the system's screen for writing an email, filled in, for them to check and send. Nothing is sent without them.
nimbus native plugin add mail-composer
status, err := mailcomposer.Compose(ctx, mailcomposer.Options{
To: []string{"hello@example.com"}, Subject: "Order 1042", Body: "Hello",
})
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct {
Name string `json:"name"` // its file name
Type string `json:"type"` // a MIME type, such as "application/pdf"
Data []byte `json:"data"` // its contents
}
File is an attachment, as bytes.
type Options ¶
type Options struct {
To []string `json:"to,omitempty"` // who it goes to
CC []string `json:"cc,omitempty"` // who's copied
BCC []string `json:"bcc,omitempty"` // who's copied, unseen
Subject string `json:"subject,omitempty"` // its subject
Body string `json:"body,omitempty"` // its text
// HTML treats Body as HTML. It's iOS only: Android sends it as plain text.
HTML bool `json:"html,omitempty"`
Files []File `json:"files,omitempty"` // attachments
}
Options is what to fill in. They can change all of it.
Click to show internal directories.
Click to hide internal directories.