Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make the email client explicity set the format to be HTML #1149

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions internal/mailer/mailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ type Mailer interface {
func NewMailer(globalConfig *conf.GlobalConfiguration) Mailer {
mail := gomail.NewMessage()

// so that messages are not grouped under each other
mail.SetHeader("Message-ID", fmt.Sprintf("<%s@gotrue-mailer>", uuid.Must(uuid.NewV4()).String()))
mail.SetHeaders(map[string][]string{
// Make the emails explicitly set to be HTML formatted (to cover older email clients)
"Content-Type": {"text/html; charset=utf-8"},
J0 marked this conversation as resolved.
Show resolved Hide resolved
// so that messages are not grouped under each other
"Message-ID": {fmt.Sprintf("<%s@gotrue-mailer>", uuid.Must(uuid.NewV4()).String())},
})

from := mail.FormatAddress(globalConfig.SMTP.AdminEmail, globalConfig.SMTP.SenderName)

Expand Down