post

package
v0.11.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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() []byte

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