Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config func(*option)
Config 邮件主要配置
func WithConfig ¶
func WithConfig(host string, port int, transport, username, password, fromUser, fromName string) Config
WithConfig 设置邮件主要配置 @param host string 邮件提供商发送地址 @param port int 邮件提供商发送端口 @param transport string 邮件提供商发送协议 @param username string 邮件提供商用户名 @param password string 邮件提供商用户密码 @param fromUser string 发送者邮箱地址 @param fromName string 发送者名称
type Mail ¶
type Mail struct {
// contains filtered or unexported fields
}
Mail 邮件发送器
func NewMailSender ¶
NewMailSender 新建邮件发送器 to []string 接收者邮箱地址列表 template 邮件模板 config Config 邮件配置 opts []Option 邮件额外选项
type Option ¶
type Option func(*option)
Option 邮件额外配置
func WithAttach ¶
WithAttach 添加邮件附件 @param filename string 附件文件地址 @param attachName string 附件名称
func WithParams ¶
WithParams 添加邮件参数 @param params map[string]string 参数列表
func WithSubject ¶
WithSubject 添加邮件主题 @param subject string 邮件主题
Click to show internal directories.
Click to hide internal directories.