mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-06 14:53:15 -06:00
[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
This commit is contained in:
parent
15e0bf6e5a
commit
c2738474d5
4 changed files with 33 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue