email

package
v0.0.0-...-f3ad2b4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMail

func NewMail() Email

Types

type Mail

type Mail struct {
	From Recipient
	To   []Recipient
	Cc   []Recipient
	Bcc  []Recipient

	BodyParts           []*Part
	Attachments         []*Part
	EmbeddedAttachments []*Part

	Headers map[string][]string
}

func (*Mail) AddBcc

func (e *Mail) AddBcc(email, name string)

func (*Mail) AddBody

func (e *Mail) AddBody(contentType string, body []byte)

func (*Mail) AddCc

func (e *Mail) AddCc(email, name string)

func (*Mail) AddTo

func (e *Mail) AddTo(email, name string)

func (*Mail) Attach

func (e *Mail) Attach(contentType string, data []byte) apperror.Error

func (*Mail) AttachFile

func (e *Mail) AttachFile(path string) apperror.Error

func (*Mail) AttachReader

func (e *Mail) AttachReader(contentType string, reader io.ReadCloser) apperror.Error

func (*Mail) Embed

func (e *Mail) Embed(contentType string, data []byte) apperror.Error

func (*Mail) EmbedFile

func (e *Mail) EmbedFile(path string) apperror.Error

func (*Mail) EmbedReader

func (e *Mail) EmbedReader(contentType string, reader io.ReadCloser) apperror.Error

func (*Mail) GetAttachments

func (e *Mail) GetAttachments() []EmailPart

func (*Mail) GetBcc

func (e *Mail) GetBcc() []EmailRecipient

func (*Mail) GetBodyParts

func (e *Mail) GetBodyParts() []EmailPart

func (*Mail) GetCc

func (e *Mail) GetCc() []EmailRecipient

func (*Mail) GetEmbeddedAttachments

func (e *Mail) GetEmbeddedAttachments() []EmailPart

func (*Mail) GetFrom

func (e *Mail) GetFrom() EmailRecipient

func (*Mail) GetSubject

func (e *Mail) GetSubject() string

func (*Mail) GetTo

func (e *Mail) GetTo() []EmailRecipient

func (*Mail) SetBody

func (e *Mail) SetBody(contentType string, body []byte)

func (*Mail) SetFrom

func (e *Mail) SetFrom(email, name string)

func (*Mail) SetHeader

func (e *Mail) SetHeader(name string, values ...string)

func (*Mail) SetHeaders

func (e *Mail) SetHeaders(data map[string][]string)

func (*Mail) SetSubject

func (e *Mail) SetSubject(subject string)

type Part

type Part struct {
	MimeType string
	Content  []byte
	Reader   io.ReadCloser
	FilePath string
}

func (Part) GetContent

func (p Part) GetContent() []byte

func (Part) GetFilePath

func (p Part) GetFilePath() string

func (Part) GetMimeType

func (p Part) GetMimeType() string

func (Part) GetReader

func (p Part) GetReader() io.ReadCloser

func (*Part) SetFilePath

func (p *Part) SetFilePath(path string)

type Recipient

type Recipient struct {
	Email string
	Name  string
}

func (Recipient) GetEmail

func (r Recipient) GetEmail() string

func (Recipient) GetName

func (r Recipient) GetName() string

Directories

Path Synopsis
A email service implementation that just logs the mails.
A email service implementation that just logs the mails.

Jump to

Keyboard shortcuts

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