fit: gmail (#1949)
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package email
|
package email
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/google/uuid"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudreve/Cloudreve/v3/pkg/util"
|
"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.SetAddressHeader("Reply-To", client.Config.ReplyTo, client.Config.Name)
|
||||||
m.SetHeader("To", to)
|
m.SetHeader("To", to)
|
||||||
m.SetHeader("Subject", title)
|
m.SetHeader("Subject", title)
|
||||||
|
m.SetHeader("Message-ID", fmt.Sprintf("<%s@%s>", uuid.NewString(), "cloudreve"))
|
||||||
m.SetBody("text/html", body)
|
m.SetBody("text/html", body)
|
||||||
client.ch <- m
|
client.ch <- m
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user