Homec4science

Provide a simple email parser class to libphutil

Authored by epriestley <git@epriestley.com> on Sep 22 2011, 03:27.

Description

Provide a simple email parser class to libphutil

Summary:
We do ad-hoc email address parsing in two places in Phabricator: when receiving
emails to objects (e.g., replying to a diff) and when parsing authors for
commits.

In the latter case, we don't do a very good job (see T502). Provide a simple
parser class so we can share this logic and have a sensible API around it.

I'm not trying to do the whole RFC thing since that's a gigantic mess, I think
this is sufficient for all actual email addresses that people actually receive
email at. I've allowed localpart only addresses since they generally work on
unix systems, e.g. dev/test envs.

Test Plan: Ran test cases.

Reviewers: jungejason, nh, tuomaspelkonen, aran, Makinde

Reviewed By: aran

CC: aran, epriestley

Differential Revision: 954

Details

Committed
epriestley <git@epriestley.com>Sep 27 2011, 18:43
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU9b1a08f22f87: Print query text from PhutilServiceProfile under the default echo handler (e.g.
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU8fe8e9e83449: Provide a simple email parser class to libphutil (authored by epriestley <git@epriestley.com>).Sep 27 2011, 18:43