Documentation ¶
Index ¶
- Constants
- type Mail
- func (m *Mail) AddAttachment(path string) error
- func (m *Mail) AddAttachmentAll(paths []string) error
- func (m *Mail) AddBcc(bcc string)
- func (m *Mail) AddBccAll(bcc []string)
- func (m *Mail) AddCc(cc string)
- func (m *Mail) AddCcAll(cc []string)
- func (m *Mail) AddHeader(key string, value string)
- func (m *Mail) AddHtmlFile(path string) error
- func (m *Mail) AddTo(to string)
- func (m *Mail) AddToAll(to []string)
- func (m *Mail) AttachTextFile(src string) error
- func (m *Mail) Raw() (string, error)
- func (m *Mail) ToBytes() ([]byte, error)
- type MailSender
- type MailServer
Constants ¶
View Source
const ( GMAIL = "gmail" YAHOO = "yahoo" OUTLOOK = "outlook" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mail ¶
type Mail struct { From string To []string Cc []string Bcc []string Subject string Body string Attachments map[string][]byte Headers map[string]string // contains filtered or unexported fields }
func (*Mail) AddAttachment ¶ added in v0.1.2
func (*Mail) AddAttachmentAll ¶ added in v0.1.2
func (*Mail) AddHtmlFile ¶ added in v0.1.2
func (*Mail) AttachTextFile ¶ added in v0.1.2
type MailSender ¶
type MailServer ¶
type MailServer struct { Sender MailSender Auth smtp.Auth }
func NewMailServer ¶
func NewMailServer(email, password, provider string) *MailServer
func NewMailServerFromSender ¶ added in v0.1.1
func NewMailServerFromSender(sender MailSender) *MailServer
func (*MailServer) SendMail ¶
func (s *MailServer) SendMail(mail *Mail) error
Click to show internal directories.
Click to hide internal directories.