email

package
v0.0.0-...-3a8821d Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(options SmtpServer, email Message) error

Types

type Attachment

type Attachment struct {
	Name        string
	CID         string
	ContentType string
	Content     io.Reader
	Inline      bool
}

type Message

type Message struct {
	From         string
	To           []string
	Subject      string
	PlainMessage string
	HtmlMessages string
	Attachments  []Attachment
	Rand         *rand.Rand
}

func (*Message) Write

func (e *Message) Write(w io.Writer) (err error)

type SmtpServer

type SmtpServer struct {
	HostPort string
	Tls      *tls.Config
	User     string
	Password string
	Hello    string
}

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.Writer, contentType string, random *rand.Rand) (Writer, error)

func (Writer) AddPart

func (w Writer) AddPart(headers textproto.MIMEHeader, reader io.Reader) error

func (Writer) AddQuotedPrintablePart

func (w Writer) AddQuotedPrintablePart(contentType string, content []byte) error

func (Writer) AddWriter

func (w Writer) AddWriter(contentType string) (Writer, error)

func (Writer) Boundary

func (w Writer) Boundary() string

func (Writer) Close

func (w Writer) Close() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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