-
Notifications
You must be signed in to change notification settings - Fork 21
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
Parsing addresses #8
Comments
Hi Emile, Thanks a lot for the feedback. Because I wanted to get this baby out of the door after two weeks of hard work, I choose to focus on a stable API. Hence, I decided to be liberate in the values to accept as email address. Now the API is stable, a RFC compliant e-mail address parser is an area that will have focus now. I have already read upon some difficulties that I might hit in this regard. Therefore I already skipped regular expressions, and implemented a byte per byte parser. But yes, it will not be a funny exercise to get it fully compliant. Another area that might also have attention is smtp extensions. But as we are implementing this library in our software now, we will only use smtp for development purposes. In production we have our own transport via rabbitmq, for business reasons you are likely to be most aware of! Cheers, |
You can of course also have the MIME be created by your MTA/MailerQ. You can simply feed it with JSON objects holding all the properties: from, to, subject, text-version, html, attachments, et cetera. The MTA then converts that JSON into a MIME string and delivers it. That will save you a lot of time, code and complexity. But I can understand that it is also simply fun to write a good mail library. It's a hell of a job, but it will bring you a lot of knowledge about how email works. Good luck! 😃 |
@EmielBruijntjes Yes, we can do that. But you need to do it yourself anyway, when doing non-mailerq deliveries, e.g. when testing. |
I don't know about RFC 2822. But for email validation : swiftmailer seems using https://github.com/egulias/EmailValidator , which is actually a port of https://github.com/dominicsayers/isemail . oh and yes https://github.com/auraphp/Aura.Filter also does have the same. |
Good idea @harikt . I will have to do a little research to see what the best approach would be here. |
https://github.com/egulias/EmailValidator (as harikt suggested) is also used by Swiftmailer and the Symfony Validator component (when strict email validation is enabled). |
What is the status here? |
No progress. Feel free to suggest something through a PR. |
Hello Frederik,
The existing PHP mail libraries are not good, so I can see the point of writing a new one. But I took the liberty to run some test input that we use for our software through your library, and you might want to spend some extra time on it. Parsing email addresses is painful, especially if you want to be fully RFC 2822 compatible. I can give you some extra input once you have tackled this :)
Cheers,
Emiel
The text was updated successfully, but these errors were encountered: