email

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment added in v0.2.1

type Attachment struct {
	Filename    string `json:"filename"`
	ContentType string `json:"content_type"`
	Content     string `json:"content"`
	Encoded     bool   `json:"encoded"`
}

Email attachment. The content of the attachment is provided either as a UTF-8 string or as a Base64-encoded string ("encoded" set to "true").

func (Attachment) Write added in v0.2.1

func (a Attachment) Write(w *multipart.Writer) error

Write the attachment to the specified multipart writer.

type Email

type Email struct {
	From        string       `json:"from"`
	To          []string     `json:"to"`
	Cc          []string     `json:"cc"`
	Bcc         []string     `json:"bcc"`
	Subject     string       `json:"subject"`
	Text        string       `json:"text"`
	Html        string       `json:"html"`
	Attachments []Attachment `json:"attachments"`
}

Abstract representation of an email.

func (*Email) Messages added in v0.2.1

func (e *Email) Messages(s *queue.Storage) ([]*queue.Message, error)

Convert the email into an array of messages grouped by host suitable for delivery to the mail queue.

type EmailHeaders added in v0.2.1

type EmailHeaders map[string]string

Map of email headers.

func (EmailHeaders) Write added in v0.2.1

func (e EmailHeaders) Write(w io.Writer) error

Write the headers to the specified io.Writer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL