Documentation ¶
Index ¶
- type MailContent
- func (m *MailContent) AddBcc(bcc string) error
- func (m *MailContent) AddCc(cc string) error
- func (m *MailContent) AddHeader(key, value string) error
- func (m *MailContent) AddTo(to string) error
- func (m *MailContent) Attach(file string)
- func (m *MailContent) SendMail() error
- func (m *MailContent) SetFrom(from string) error
- func (m *MailContent) SetHeader(key, value string)
- func (m *MailContent) SetReplyTo(reply string) error
- type SmtpServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MailContent ¶
type MailContent struct { From *mail.Address To []*mail.Address Cc []*mail.Address Bcc []*mail.Address ReplyTo *mail.Address Subject string Body string BodyContentType string Headers map[string]string Attachments map[string]string ServerInfo *SmtpServer }
func (*MailContent) AddBcc ¶
func (m *MailContent) AddBcc(bcc string) error
func (*MailContent) AddCc ¶
func (m *MailContent) AddCc(cc string) error
func (*MailContent) AddHeader ¶
func (m *MailContent) AddHeader(key, value string) error
func (*MailContent) AddTo ¶
func (m *MailContent) AddTo(to string) error
func (*MailContent) Attach ¶
func (m *MailContent) Attach(file string)
func (*MailContent) SendMail ¶
func (m *MailContent) SendMail() error
func (*MailContent) SetFrom ¶
func (m *MailContent) SetFrom(from string) error
func (*MailContent) SetHeader ¶
func (m *MailContent) SetHeader(key, value string)
func (*MailContent) SetReplyTo ¶
func (m *MailContent) SetReplyTo(reply string) error
type SmtpServer ¶
type SmtpServer struct { SmtpHost string SmtpPort uint16 SmtpUsername string SmtpPassword string SmtpSecret string Identity string }
func NewSmtpServer ¶
func NewSmtpServer( host string, port uint16, username, password string, ) *SmtpServer
func NewSmtpServerCRAMMD5 ¶
func NewSmtpServerCRAMMD5( host string, port uint16, username, secret string, ) *SmtpServer
func NewSmtpServerWithID ¶
func NewSmtpServerWithID( host string, port uint16, username, password, identity string, ) *SmtpServer
func (*SmtpServer) EasySendMail ¶
func (s *SmtpServer) EasySendMail(from, to, subject, body string) error
func (*SmtpServer) NewHTMLMessage ¶
func (s *SmtpServer) NewHTMLMessage(subject, body string) *MailContent
func (*SmtpServer) NewMessage ¶
func (s *SmtpServer) NewMessage(subject, body string) *MailContent
Click to show internal directories.
Click to hide internal directories.