Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoSendMail ¶
func DoSendMail(server_address string, auth_user string, auth_password string, mail_title string, mail_content string, options ...OptionFunc) (err error)
单次调用,发送邮件
Types ¶
type MailSender ¶
type MailSender struct {
// contains filtered or unexported fields
}
func New ¶
func New(server_address string, auth_user string, auth_password string, options ...OptionFunc) *MailSender
type OptionFunc ¶
type OptionFunc func(*MailSender)
func WithContentType ¶
func WithContentType(s string) OptionFunc
发件人名称为空时,使用 smtp_user 中 @ 之前的部分作为发件人名称
func WithOptions ¶
func WithOptions(options MailSender) OptionFunc
func WithSenderUsername ¶
func WithSenderUsername(s string) OptionFunc
发件人名称为空时,使用 smtp_user 中 @ 之前的部分作为发件人名称
Click to show internal directories.
Click to hide internal directories.