-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Message-id validator #290
Message-id validator #290
Conversation
I'd appreciate your thoughts @driesvints @derrabus , this should fix Swiftmailer & Symfony mailer needs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new validator passes the test suite of Symfony's MIME component. Thank you! 👍🏻
src/MessageIDParser.php
Outdated
public function __construct(EmailLexer $lexer) | ||
{ | ||
$this->lexer = $lexer; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constructor could be moved to the new Parser
class as well.
Awesome. I'm not sure when I'll have time to try this out but hope to soon. Thanks! |
Hey @egulias. I can confirm this fixes the failing test for SwiftMailer. Thanks! I'll keep an eye out until a new release with this has been tagged and then I'll send in a patch to SwiftMailer. |
Co-authored-by: Alexander M. Turek <me@derrabus.de>
Co-authored-by: Alexander M. Turek <me@derrabus.de>
…tor into message-id-validator
message-id header validation according to RFC2822 section 3.6.4. This header field has some differences to an addr-spec, like not allowing comments and explicity allowing for many other charcters in the "domain part".
For message-id, parts are
id-left
@id-right
.Added a new validator, refactor of internals to allow for extension.
Fixes #282 & symfony/symfony#39685