Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewLine string = "\r\n"
Functions ¶
Types ¶
type MailSender ¶
type Mailer ¶
type Mailer struct {
Server string
Port int
UserName string
Password string
Host 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 (*Mailer) SendMessage ¶
Send the given email messages using this Mailer.
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 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
Click to show internal directories.
Click to hide internal directories.