smtpx

package
v0.0.0-...-ed396f1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Simple smtp client to send email(support Chinese). Work well with qq, 163, mac mail app, google mail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Filename string
	Data     []byte
}

func NewAttachment

func NewAttachment(filename string, data []byte) Attachment

type Letter

type Letter struct {
	Subject string
	// contains filtered or unexported fields
}

func NewLetter

func NewLetter() *Letter

func (*Letter) AddAttachment

func (l *Letter) AddAttachment(filename string, data []byte)

func (*Letter) AddAttachments

func (l *Letter) AddAttachments(attachments ...Attachment)

func (*Letter) AddCarbonCopy

func (l *Letter) AddCarbonCopy(addresses ...string)

func (*Letter) AddReceivers

func (l *Letter) AddReceivers(addresses ...string)

func (*Letter) Dump

func (l *Letter) Dump()

func (*Letter) SetContent

func (l *Letter) SetContent(content string)

func (*Letter) SetSubject

func (l *Letter) SetSubject(subject string)

type Sender

type Sender struct {
	Host     string
	Port     int
	Address  string
	Password string
	Name     string
}

func NewSender

func NewSender(host string, port int, name, address, password string) *Sender

func (*Sender) Send

func (s *Sender) Send(l *Letter) error

Jump to

Keyboard shortcuts

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