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

fix: allow commas in email confirmation sender #1782

Merged
merged 3 commits into from
May 4, 2021

Conversation

mantariksh
Copy link
Contributor

@mantariksh mantariksh commented May 4, 2021

Problem

We allow admins to specify the email sender for email confirmations. However, when the sender contains a comma, the text before the comma gets cut off.

Example from production

Specifying an email sender with a comma
image

Actual email sender
Screenshot 2021-05-04 at 11 21 44 AM

Solution

According to this issue, sender names containing commas must be wrapped in quotes. This fixed the problem.

Example from staging

Specifying an email sender with a comma
image

Actual email sender
Screenshot 2021-05-04 at 11 24 43 AM

Backwards compatibility

Note that for senders without special characters, the email headers actually remain unchanged, so this change is backwards compatible even for receivers which are manually parsing email headers. For senders with special characters, the email headers get fixed by the inclusion of quotes.

Without comma, before (production)
Screenshot 2021-05-04 at 11 28 28 AM

Without comma, after (staging)
Screenshot 2021-05-04 at 11 27 19 AM

With comma, before (production)
Screenshot 2021-05-04 at 11 28 50 AM

With comma, after (staging)
Screenshot 2021-05-04 at 11 29 19 AM

Tests

  • Add an email field with email confirmation. Add a sender string with a comma in it and submit the form. Check that the sender string appears correctly in your email.

Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

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

lgtm

@mantariksh mantariksh merged commit a512b54 into develop May 4, 2021
@karrui karrui mentioned this pull request May 4, 2021
@mantariksh mantariksh deleted the fix/email-conf-commas branch May 18, 2021 08:29
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.

3 participants