mirror of
https://github.com/harness-community/drone-email.git
synced 2026-06-13 10:32:05 +08:00
fix: invalid address
This commit is contained in:
@@ -190,6 +190,9 @@ func (p Plugin) Exec() error {
|
||||
// Send emails
|
||||
message := gomail.NewMessage()
|
||||
for _, recipient := range p.Config.Recipients {
|
||||
if len(recipient) == 0 {
|
||||
continue
|
||||
}
|
||||
message.SetHeader("From", p.Config.From)
|
||||
message.SetAddressHeader("To", recipient, "")
|
||||
message.SetHeader("Subject", subject)
|
||||
|
||||
Reference in New Issue
Block a user