rmailer

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

README

rmailer

library in go to send mails via smtp protocol

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	To          []mail.Address
	CC          []mail.Address
	BCC         []mail.Address
	Subject     string
	Body        string
	Attachments map[string][]byte
}

func NewMessage

func NewMessage(s, b string) *Message

func (*Message) AttachFile

func (m *Message) AttachFile(src string) error

func (*Message) ToBytes

func (m *Message) ToBytes() []byte

type Sender

type Sender struct {
	UserName   string
	Password   string
	ServerName string
	TLS        bool
}

func NewSender

func NewSender(u string, p string, s string, t bool) *Sender

func (*Sender) AnonymousSend

func (s *Sender) AnonymousSend(m *Message) error

func (*Sender) AuthenticatedSend

func (s *Sender) AuthenticatedSend(m *Message) error

func (*Sender) IsAuthenticated

func (s *Sender) IsAuthenticated() bool

func (*Sender) Send

func (s *Sender) Send(m *Message) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳