You've already forked watchtower
							
							
				mirror of
				https://github.com/containrrr/watchtower.git
				synced 2025-10-31 00:17:44 +02:00 
			
		
		
		
	feat: add support for multiple email recipients
This commit is contained in:
		| @@ -6,6 +6,7 @@ import ( | ||||
| 	"github.com/spf13/cobra" | ||||
| 	"net/smtp" | ||||
| 	"os" | ||||
| 	"strings" | ||||
| 	"time" | ||||
|  | ||||
| 	t "github.com/containrrr/watchtower/pkg/types" | ||||
| @@ -113,7 +114,7 @@ func (e *emailTypeNotifier) sendEntries(entries []*log.Entry) { | ||||
| 		if e.User != "" { | ||||
| 			auth = smtp.PlainAuth("", e.User, e.Password, e.Server) | ||||
| 		} | ||||
| 		err := SendMail(e.Server+":"+strconv.Itoa(e.Port), e.tlsSkipVerify, auth, e.From, []string{e.To}, msg) | ||||
| 		err := SendMail(e.Server+":"+strconv.Itoa(e.Port), e.tlsSkipVerify, auth, e.From, strings.Split(e.To, ","), msg) | ||||
| 		if err != nil { | ||||
| 			// Use fmt so it doesn't trigger another email. | ||||
| 			fmt.Println("Failed to send notification email: ", err) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user