Skip to content

[Mailer] maintain sender/recipient name in SMTP envelopes #33387

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 1 commit into from
Sep 4, 2019

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Aug 30, 2019

Q A
Branch? 4.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #33383
License MIT
Doc PR

@xabbuh
Copy link
Member Author

xabbuh commented Aug 30, 2019

The build failure is unrelated to the changes.

@xabbuh xabbuh force-pushed the issue-33383 branch 2 times, most recently from 18339a0 to c1d2451 Compare August 30, 2019 12:28
@xabbuh
Copy link
Member Author

xabbuh commented Aug 30, 2019

I found some more places. Ready to be reviewed now.

@fbourigault
Copy link
Contributor

fbourigault commented Aug 30, 2019

As Address is an immutable object, it should be better to use those as-is instead of creating new instances.

Moreover, we are lacking some escaping to flawlessly use addresses names in email headers.

AFAIK, commas and double quotes have to be escaped.

I use the following code in my project which ATM use the official postmark client:

        $name = preg_replace('/"/u', '\"', $name);
        if (preg_match('/,/u', $name)) {
            $name = sprintf('"%s"', $name);
        }

I quickly looked at RFC, but address grammar can be found in https://tools.ietf.org/html/rfc2822#section-3.4.

@fabpot
Copy link
Member

fabpot commented Sep 3, 2019

I think this one needs to be rebased on 4.3 as this is a bug fix, right? @xabbuh Can you rebase?

@xabbuh xabbuh changed the base branch from 4.4 to 4.3 September 4, 2019 09:07
@xabbuh xabbuh modified the milestones: next, 4.3 Sep 4, 2019
@fabpot
Copy link
Member

fabpot commented Sep 4, 2019

Thank you @xabbuh.

fabpot added a commit that referenced this pull request Sep 4, 2019
…(xabbuh)

This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] maintain sender/recipient name in SMTP envelopes

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33383
| License       | MIT
| Doc PR        |

Commits
-------

46ed0e8 maintain sender/recipient name in SMTP envelopes
@fabpot fabpot merged commit 46ed0e8 into symfony:4.3 Sep 4, 2019
@xabbuh xabbuh deleted the issue-33383 branch September 4, 2019 10:09
@fabpot fabpot mentioned this pull request Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants