Documentation ¶
Index ¶
- Constants
- type Client
- type Config
- type Message
- func (message *Message) SetBCC(bcc ...string) *Message
- func (message *Message) SetBody(body string) *Message
- func (message *Message) SetCC(cc ...string) *Message
- func (message *Message) SetContent(content string) *Messagedeprecated
- func (message *Message) SetContentType(contentType string) *Message
- func (message *Message) SetDate(date string) *Message
- func (message *Message) SetReceiver(to ...string) *Message
- func (message *Message) SetSender(from string) *Message
- func (message *Message) SetSubject(subject string) *Message
Constants ¶
View Source
const ( HostQQMail = "smtp.qq.com" PortQQMail = "25" )
View Source
const ( ContentTypeText = "text/plain;charset=UTF-8" ContentTypeHtml = "text/html;charset=UTF-8" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { // From sender, default "whereabouts.icu" From string `json:"From"` // To receivers, can not be nil To []string `json:"-"` // CC send a duplicate to CC []string `json:"-"` // BCC blind carbon copy BCC []string `json:"-"` // Subject email title, default "test email" Subject string `json:"Subject"` // ContentType email type:text or html ContentType string `json:"Content-Type"` // Date send time, default now Date string `json:"Date"` // Body email content, default "hello world!this is a test mail!" Body string `json:"-"` }
func NewMessage ¶
func NewMessage() *Message
func (*Message) SetContent
deprecated
func (*Message) SetContentType ¶
func (*Message) SetReceiver ¶
func (*Message) SetSubject ¶
Click to show internal directories.
Click to hide internal directories.