Skip to content

Commit

Permalink
Merge pull request #1 from Nerdbergev/messageid
Browse files Browse the repository at this point in the history
add message id
  • Loading branch information
PhilmacFLy authored Nov 22, 2024
2 parents 9fcc824 + c4e3fdd commit 6091716
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/seilfahrt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"cgt.name/pkg/go-mwclient"
"github.com/Nerdbergev/seilfahrt/internal/htmltemplates"
"github.com/pelletier/go-toml"
"github.com/google/uuid"
gomail "gopkg.in/mail.v2"
)

Expand Down Expand Up @@ -238,6 +239,9 @@ func SendMail(pageName string, conf Config) error {
// Set E-Mail body. You can set plain text or html with text/html
m.SetBody("text/plain", body.String())

// Set Message Id
m.SetHeader("Message-ID", uuid.New().String())

// Settings for SMTP server
d := gomail.NewDialer(conf.MailServer, 587, conf.MailAdress, conf.MailPassword)

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.21

require (
cgt.name/pkg/go-mwclient v1.3.0
github.com/google/uuid v1.6.0
github.com/pelletier/go-toml v1.9.5
gopkg.in/mail.v2 v2.3.1
)
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ cgt.name/pkg/go-mwclient v1.3.0 h1:8PtOxq+aL4wtyLZXHPImpNtUioFq/DxBwae2C44j2gE=
cgt.name/pkg/go-mwclient v1.3.0/go.mod h1:X1auRhzIA0Bz5Yx7Yei29vUqr/Ju+r8IWudnJmmAG30=
github.com/antonholmquist/jason v1.0.0 h1:Ytg94Bcf1Bfi965K2q0s22mig/n4eGqEij/atENBhA0=
github.com/antonholmquist/jason v1.0.0/go.mod h1:+GxMEKI0Va2U8h3os6oiUAetHAlGMvxjdpAH/9uvUMA=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 h1:j2kD3MT1z4PXCiUllUJF9mWUESr9TWKS7iEKsQ/IipM=
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450/go.mod h1:skjdDftzkFALcuGzYSklqYd8gvat6F1gZJ4YPVbkZpM=
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
Expand Down

0 comments on commit 6091716

Please sign in to comment.