post

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("Email message error")

Error is the default message errs class

Functions

This section is empty.

Types

type Address

type Address = mail.Address

Address is alias of net/mail.Address

type LoginAuth

type LoginAuth struct {
	Username string
	Password string
}

LoginAuth implements LOGIN authentication mechanism

func (LoginAuth) Next

func (auth LoginAuth) Next(fromServer []byte, more bool) (toServer []byte, err error)

Next continues the authentication with server response and flag representing if server expects more data from client

func (LoginAuth) Start

func (auth LoginAuth) Start(server *smtp.ServerInfo) (proto string, toServer []byte, err error)

Start begins an authentication with a server

type Message

type Message struct {
	From      Address
	To        []Address
	Subject   string
	ID        string
	Date      time.Time
	ReceiptTo []string

	PlainText string
	Parts     []Part
}

Message is RFC compliant email message

func (*Message) Bytes

func (msg *Message) Bytes() (data []byte, err error)

Bytes builds message and returns result as bytes

type Part

type Part struct {
	Type        string
	Encoding    string
	Disposition string
	Content     string
}

Part represent one part of multipart message

type SMTPSender

type SMTPSender struct {
	ServerAddress string

	From Address
	Auth smtp.Auth
}

SMTPSender is smtp sender

func (*SMTPSender) FromAddress

func (sender *SMTPSender) FromAddress() Address

FromAddress implements satellite/mail.SMTPSender

func (*SMTPSender) SendEmail

func (sender *SMTPSender) SendEmail(msg *Message) error

SendEmail sends email message to the given recipient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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