summaryrefslogtreecommitdiff
path: root/internal/email/sender.go
diff options
context:
space:
mode:
authorLibravatar Julian <j.r@jugendhacker.de>2024-06-22 23:36:30 +0200
committerLibravatar GitHub <noreply@github.com>2024-06-22 23:36:30 +0200
commitc2738474d5f4bcdd83bdc09c372f27fe677201ab (patch)
tree1df6cc7f8882774274cb72c90a34ea3febc42448 /internal/email/sender.go
parent[chore] update github.com/ncruces/go-sqlite3 -> v0.16.3 (#3029) (diff)
downloadgotosocial-c2738474d5f4bcdd83bdc09c372f27fe677201ab.tar.xz
[bugfix] add Date and Message-ID headers for email (#3031)
* [bugfix] add Date and Message-ID headers for email This should make spam filters more happy, as most of them grant some negative score for not having those headers. Also the Date is convenient for the user receiving the mail. * make golangci-lint happy
Diffstat (limited to 'internal/email/sender.go')
-rw-r--r--internal/email/sender.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/email/sender.go b/internal/email/sender.go
index a3efa6124..9db918f8a 100644
--- a/internal/email/sender.go
+++ b/internal/email/sender.go
@@ -76,11 +76,13 @@ func NewSender() (Sender, error) {
host := config.GetSMTPHost()
port := config.GetSMTPPort()
from := config.GetSMTPFrom()
+ msgIDHost := config.GetHost()
return &sender{
hostAddress: fmt.Sprintf("%s:%d", host, port),
from: from,
auth: smtp.PlainAuth("", username, password, host),
+ msgIDHost: msgIDHost,
template: t,
}, nil
}
@@ -89,5 +91,6 @@ type sender struct {
hostAddress string
from string
auth smtp.Auth
+ msgIDHost string
template *template.Template
}