Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewLine string = "\r\n"
Functions ¶
Types ¶
type Message ¶
type Message struct { From string ReplyTo string To []string Cc []string Bcc []string Subject string PlainBody *bytes.Buffer HtmlBody *bytes.Buffer Date time.Time MessageId string }
func NewHtmlMessage ¶
NewHtmlMessage create a html message
func NewMessage ¶
NewTextMessage create a plain text message
func NewTextAndHtmlMessage ¶
NewTextAndHtmlMessage create a message contains both plain text and html message
func NewTextMessage ¶
NewTextMessage create a plain text message
func (*Message) RenderData ¶
RenderData render the whole email body
type SMTPHelper ¶
type SMTPHelper struct { Smtp *SMTP HostName string // This is optional, only used if you want to tell smtp server your hostname Auth smtp.Auth // This is optional, only used if Authentication is not plain Sender *Sender // This is optional, only used if the From/ReplyTo is not specified in the message }
func NewSMTPHelper ¶
func NewSMTPHelper(s *SMTP) *SMTPHelper
func (*SMTPHelper) Process ¶
func (helper *SMTPHelper) Process(to []string, subject, template string, data map[string]interface{}) error
func (*SMTPHelper) SendMessage ¶
func (helper *SMTPHelper) SendMessage(messages ...*Message) (err error)
Send the given email messages using this Mailer.
Click to show internal directories.
Click to hide internal directories.