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

Correctly implements RFC6531 #44136

Closed
j-bernard opened this issue Nov 18, 2021 · 5 comments
Closed

Correctly implements RFC6531 #44136

j-bernard opened this issue Nov 18, 2021 · 5 comments

Comments

@j-bernard
Copy link
Contributor

Symfony version(s) affected

5.1

Description

Commit d057dff allows non-ASCII local-part in email addresses but this should come with RFC6531 implementation (SMTPUTF8 extension).
It seems that this is not implemented.

How to reproduce

$transport = new EsmtpTransport($host, $port);
$mailer = new Mailer($transport);

$email = (new Email())
    ->from($from)
    ->to($to)
    ->subject($subject)
    ->text($recipient);
$mailer->send($email);

If you try sending an email with non-ASCII email address to a server that correctly implements RFC6531, it will return 501 Syntax Error.
You can try with this version of Mailhog that implements SMTPUTF8 extension.

Possible Solution

Implement RFC6531

Additional Context

No response

@carsonbot
Copy link

Hey, thanks for your report!
There has not been a lot of activity here for a while. Is this bug still relevant? Have you managed to find a workaround?

@j-bernard
Copy link
Contributor Author

This is still relevant! There is no way to make this work without fixing the library.
The implementations is not following the RFC standard.

@carsonbot carsonbot removed the Stalled label May 20, 2022
@stof
Copy link
Member

stof commented May 20, 2022

@j-bernard but are you willing to contribute a fix ?

@j-bernard
Copy link
Contributor Author

I'm willing but the real question is do I have the time to work on it ;)
I'll keep you in touch whenever I start working on this, I have no idea of the complexity of this as it will certainly depend on how the SMTP client is implemented. In the meantime, f you guys are interested in fixing this I can still provide some help and guidance.

@fabpot
Copy link
Member

fabpot commented Jul 27, 2022

Swiftmailer has SMTPUTF8 support, but it comes with some constraints. So, I decided to not port it to Symfony Mailer as converting the domain to ASCII is enough to make it work everywhere.
Closing for now.

@fabpot fabpot closed this as completed Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants