Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailNotifier ¶
type EmailNotifier struct {
// contains filtered or unexported fields
}
func New ¶
func New(config *EmailNotifierConfig) (*EmailNotifier, error)
func (*EmailNotifier) Notify ¶
func (n *EmailNotifier) Notify(ctx context.Context, subject string, message string) (res *notifier.NotifyResult, err error)
type EmailNotifierConfig ¶
type EmailNotifierConfig struct { // SMTP 服务器地址。 SmtpHost string `json:"smtpHost"` // SMTP 服务器端口。 // 零值时根据是否启用 TLS 决定。 SmtpPort int32 `json:"smtpPort"` // 是否启用 TLS。 SmtpTLS bool `json:"smtpTLS"` // 用户名。 Username string `json:"username"` // 密码。 Password string `json:"password"` // 发件人邮箱。 SenderAddress string `json:"senderAddress"` // 收件人邮箱。 ReceiverAddress string `json:"receiverAddress"` }
Click to show internal directories.
Click to hide internal directories.