You've already forked watchtower
							
							
				mirror of
				https://github.com/containrrr/watchtower.git
				synced 2025-10-31 00:17:44 +02:00 
			
		
		
		
	Update email.go
Added Date header
This commit is contained in:
		| @@ -5,6 +5,7 @@ import ( | ||||
| 	"fmt" | ||||
| 	"net/smtp" | ||||
| 	"os" | ||||
| 	"time" | ||||
|  | ||||
| 	"strconv" | ||||
|  | ||||
| @@ -54,10 +55,13 @@ func (e *emailTypeNotifier) buildMessage(entries []*log.Entry) []byte { | ||||
| 		// We don't use fields in watchtower, so don't bother sending them. | ||||
| 	} | ||||
|  | ||||
| 	t := time.Now() | ||||
| 	 | ||||
| 	header := make(map[string]string) | ||||
| 	header["From"] = e.From | ||||
| 	header["To"] = e.To | ||||
| 	header["Subject"] = emailSubject | ||||
| 	header["Date"] = t.Format(time.RFC1123) | ||||
| 	header["MIME-Version"] = "1.0" | ||||
| 	header["Content-Type"] = "text/plain; charset=\"utf-8\"" | ||||
| 	header["Content-Transfer-Encoding"] = "base64" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user