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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mansueli
Copy link
Member

What kind of change does this PR introduce?

This makes the emails to be explicitly set to be HTML formatted instead of plain text which helper older clients that cannot figure this out themselves.

What is the current behavior?

Email messages are sent as plain/text.

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

@mansueli mansueli requested a review from a team as a code owner June 19, 2023 21:15
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"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! There's an existing SetBody within the mailme package- https://github.com/supabase/mailme/blob/main/mailme.go#L71

Not sure if that will override the header. set here - if it doesn't then I think this should be good to go!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sets the body type there, but it doesn't make it clear in the header which confuses some old email clients.
They are different/ won't override one another.

@gunawanarisandi
Copy link

Hmmm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants