feat: allow configuring smtp sender display name
This commit is contained in:
@@ -26,6 +26,8 @@ type NotifierConfig struct {
|
||||
Password string `json:"password"`
|
||||
// 发件人邮箱。
|
||||
SenderAddress string `json:"senderAddress"`
|
||||
// 发件人显示名称。
|
||||
SenderName string `json:"senderName,omitempty"`
|
||||
// 收件人邮箱。
|
||||
ReceiverAddress string `json:"receiverAddress"`
|
||||
}
|
||||
@@ -86,6 +88,7 @@ func (n *NotifierProvider) Notify(ctx context.Context, subject string, message s
|
||||
}
|
||||
|
||||
yak.From(n.config.SenderAddress)
|
||||
yak.FromName(n.config.SenderName)
|
||||
yak.To(n.config.ReceiverAddress)
|
||||
yak.Subject(subject)
|
||||
yak.Plain().Set(message)
|
||||
|
||||
Reference in New Issue
Block a user