From 3edb00a6484cef08692245cbbd41421d76ad32e5 Mon Sep 17 00:00:00 2001 From: EpicMo Date: Sat, 24 Feb 2024 21:36:59 +0800 Subject: [PATCH] fit: gmail (#1949) --- pkg/email/smtp.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/email/smtp.go b/pkg/email/smtp.go index c92cce7575..79f078556c 100644 --- a/pkg/email/smtp.go +++ b/pkg/email/smtp.go @@ -1,6 +1,8 @@ package email import ( + "fmt" + "github.com/google/uuid" "time" "github.com/cloudreve/Cloudreve/v3/pkg/util" @@ -50,6 +52,7 @@ func (client *SMTP) Send(to, title, body string) error { m.SetAddressHeader("Reply-To", client.Config.ReplyTo, client.Config.Name) m.SetHeader("To", to) m.SetHeader("Subject", title) + m.SetHeader("Message-ID", fmt.Sprintf("<%s@%s>", uuid.NewString(), "cloudreve")) m.SetBody("text/html", body) client.ch <- m return nil