fit: gmail (#1949)

This commit is contained in:
EpicMo 2024-02-24 21:36:59 +08:00 committed by GitHub
parent 88409cc1f0
commit 3edb00a648
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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