Merge pull request #19 from pnagurny/enhance/mailgun-sender

Enhance/mailgun sender
This commit is contained in:
Patrick Nagurny
2020-11-25 10:29:29 -05:00
committed by GitHub

View File

@@ -192,6 +192,7 @@ func (model *Model) SendVerificationEmail(user *types.User) error {
"<a href=\"" + link + "\">" + link + "</a>" "<a href=\"" + link + "\">" + link + "</a>"
message := mg.NewMessage(from, subject, plainTextContent, to) message := mg.NewMessage(from, subject, plainTextContent, to)
message.AddHeader("Sender", from)
message.SetHtml(htmlContent) message.SetHtml(htmlContent)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
@@ -229,6 +230,7 @@ func (model *Model) SendPasswordResetEmail(user *types.User) error {
"nothing will happen." "nothing will happen."
message := mg.NewMessage(from, subject, plainTextContent, to) message := mg.NewMessage(from, subject, plainTextContent, to)
message.AddHeader("Sender", from)
message.SetHtml(htmlContent) message.SetHtml(htmlContent)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)