Füge Message-Id zur Mail hinzu
This commit is contained in:
parent
c9883b0d3f
commit
d28d3e21ee
2 changed files with 6 additions and 3 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"log"
|
||||
"math/big"
|
||||
"net/smtp"
|
||||
|
@ -130,7 +131,8 @@ func (r *RequestRepo) sendConfirmationMail(request models.Request) error {
|
|||
var data = struct {
|
||||
Config config.Config
|
||||
Request models.Request
|
||||
}{r.config, request}
|
||||
MessageId template.HTML
|
||||
}{r.config, request, template.HTML("<" + randomString(15) + "@" + r.config.Server.Domain + ">")}
|
||||
err := templating.WriteTemplate(&message, "confirmationMail", data)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Error parsing confirmation Mail: %w", err)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
From: {{.Config.Mailer.FromName}}
|
||||
To: {{.Request.OfficeHour.Tutor.Email}}
|
||||
Subject: Sprechstunde {{if eq .Request.Action 1}}anlegen{{end}}{{if eq .Request.Action 2}}löschen{{end}}
|
||||
Message-Id: {{.MessageId}}
|
||||
|
||||
Hallo {{.Request.OfficeHour.Tutor.Name}},
|
||||
|
||||
|
|
Loading…
Reference in a new issue