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

Introduce validator on Address() #157

Open
enricobenedos opened this issue Jan 9, 2021 · 1 comment
Open

Introduce validator on Address() #157

enricobenedos opened this issue Jan 9, 2021 · 1 comment

Comments

@enricobenedos
Copy link

Good morning,

I spent some time to understand why some users was experiencing some problems with my app when sending mails. This was the error:

After sending MAIL FROM:<[email protected]>, response did not start with any of: [2].
Response from server: < 550 5.1.0 yIhdkhTPKKpB1yIhekj1KR invalid domain

After some research I found it was simply caused by a tab in the Address() name parameter.

Can it be an idea to create a validator that does not permit to introduce wrong space in the name string?

Thanks

@enricobenedos enricobenedos changed the title Introduce validator on Address Introduce validator on Address() Jan 9, 2021
@close2
Copy link
Collaborator

close2 commented Jan 29, 2021

mailer should definitely provide a possibility for address-validation.

Earlier versions had a validator which was RFC conform: https://github.com/kaisellgren/mailer/blob/cb1a63610057cdd8d04950af7e0ccb004c635aa7/lib/src/address.dart

I think that we must allow different validators. A lot of (RFC) valid addresses shouldn't be allowed.

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

2 participants