Skip to content

Fix issue where if the headers contain From it overrides the Custom SMTP From #1958

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

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

Conversation

davidshq
Copy link

What kind of change does this PR introduce?

Under some circumstances headers may be passed that override the From field. This can cause emails to come from application users instead of from the Custom SMTP Sender details and will often result in email delivery failures since most SMTPs only accept emails from approved senders.

What is the current behavior?

#1957

What is the new behavior?

Updates via headers to From are ignored, the correct Custom SMTP Sender details are preserved.

@davidshq davidshq requested a review from a team as a code owner March 10, 2025 17:28
Copy link
Member

@kangmingtay kangmingtay left a comment

Choose a reason for hiding this comment

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

thanks for contributing @davidshq!

hmm the headers passed into the Mail function do not contain the recipient's address though - just wondering, where are you seeing this?

@@ -81,17 +81,19 @@ func (m *MailmeMailer) Mail(
return err
}

mail := gomail.NewMessage()
Copy link
Member

Choose a reason for hiding this comment

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

duplicate (see line 86)

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.

2 participants