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

Entering a "From" property can cause "illegal email address" exceptions #61

Open
KoanLeeroy opened this issue Jul 16, 2018 · 2 comments

Comments

@KoanLeeroy
Copy link

If you enter a message From property formatted like this:

message.From = $"{model.FromName} <{model.FromEmail}>";
AND
model.FromName is a string with a value with a comma in it, the Postmark API fails.

The fix in this instance is to double quote the from name portion. Technically this should only be done when required according to the spec (RFC5322 https://tools.ietf.org/html/rfc5322#section-3.6.2)

Really this is the job of the SDK in my opinion. This would lead to less runtime issues.

A kinder SDK interface would look something like this...
message.From = new Postmark(model.FromName, model.FromEmail);

@soatley
Copy link

soatley commented Aug 6, 2024

Did anything ever get updated for this? We recently ran into this issue as well, but it was on version 4.5.2.

@MariuszTrybus
Copy link
Contributor

@soatley As far as I know nothing changed, if you have any issues please contact our support with more details.
Regarding the comma in display-name - according to the rfc5322 comma is not allowed in not quoted-string

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

No branches or pull requests

3 participants