Skip to content

Update regular expression for parsing recipient values #193

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

Merged
merged 2 commits into from
Apr 22, 2025

Conversation

andrewtimberlake
Copy link
Collaborator

I’ve broken the regular expression to match three distinct types of address

  1. Quoted name with address
  2. Non-quoted name with address
  3. address on it’s own

I have also changed to expanded notation to make it a little clearer.

This provides a fix for #191

NOTE: This still does not correctly parse all valid address spec values. It won’t handle comments or group syntax to name two I can immediately think of. To solve that, we’ll need a proper address spec parser

romsahel and others added 2 commits March 17, 2025 16:52
…ontaining additional quotes

Found in production, an e-mail has the 'from' field with the following value:
```ex
""[email protected]" " <[email protected]>
````

which is incorrectly parsed into `[email protected]\"` instead of
```ex
{"\"[email protected]\"", "[email protected]"}
````
I’ve broken the regular expression to match three distinct types of address

1. Quoted name with address
2. Non-quoted name with address
3. address on it’s own

I have also changed to expanded notation to make it a little clearer.
Copy link
Contributor

@romsahel romsahel left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, I missed the notification apparently.
This looks great! Thanks for the reactivity 🙏

@andrewtimberlake andrewtimberlake merged commit 7c55645 into DockYard:master Apr 22, 2025
5 checks passed
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