mmucklo / email-parse Goto Github PK
View Code? Open in Web Editor NEWEmail\Parse is a multiple (and single) email address parser for php that is reasonably RFC822 / RFC2822 compliant.
License: MIT License
Email\Parse is a multiple (and single) email address parser for php that is reasonably RFC822 / RFC2822 compliant.
License: MIT License
According to RFC 5322, page 12, ! is in the list of allowed characters for atext, but the library doesn't allow it. There's text in the source, but this may apply to the address-spec part:
// Note: check for Exim-banned characters
// See Bug #18749 - Unhandled Exception: 550 Restricted characters in address
if ($curChar == '%' || $curChar == '!')
but this makes perfectly valid display names fail.
According to RFC822 this is a valid email address
The usage section of the readme is out of date.
parseEmailAddresses
is not a method.
Update dependencies to support PHP >=7.1 and remove the composer.lock file which shouldn't be checked in.
Also update PHPUnit, and other packages that are depended upon.
It would be great if the parser showed comments as a specific attribute, see https://tools.ietf.org/html/rfc5322#section-3.2.2
Informal example:
comments are allowed with parentheses at either end of the local-part; e.g. john.smith(comment)@example.com and (comment)[email protected] are both equivalent to [email protected].
$sendingAddress = "Example | Example <[email protected]>";
$result = \Email\Parse::getInstance()->parse($sendingAddress, false);
$sendingDomain = strtolower($result['domain']);
print '$sendingDomain = ' . $sendingDomain;
$sendingAddress = strtolower($result['local_part']) . '@' . $sendingDomain;
print ': $sendingAddress = ' . $sendingAddress;
$sendingDomain =
$sendingAddress = @
Stripping out the '|' character before parsing resolves the issue.
It looks that the underlying zendframework/zend-validator
package is using the container-interop/container-interop
package which is now deprecated. The zend validatior package is also now abandoned https://github.com/zendframework/zend-validator
mmucklo/email-parse 2.0.0 email-parse a (reasonably) RFC822 / RF2822-compliant library for batch parsing multiple (and single) email addresses
├──php >=5.6.0
├──psr/log ~1.0
│ └──php >=5.3.0
├──true/punycode ~2.0
│ ├──php >=5.3.0
│ └──symfony/polyfill-mbstring ^1.3
│ └──php >=5.3.3
└──zendframework/zend-validator >=2.0,<=3.0
├──container-interop/container-interop ^1.1
│ └──psr/container ^1.0
│ └──php >=5.3.0
├──php ^7.1
└──zendframework/zend-stdlib ^3.2.1
└──php ^5.6 || ^7.0
Right now scrutinizer is reporting 72% code coverage.
It would be good to increase that to above 90%
Please fix it i use this character and fatal error "_"
please add to your tests: "Supports (E-mail)" <[email protected]>
ps: it parses correctly here.
Fails to install with composer:
oodle/email-parse dev-master requires pear-pear/net_idna2 * -> no matching package found.
[email protected]; [email protected]
doesn't seem to be parsed here.
can you add support?
also reported in zend-mail:
zendframework/zend-mail#147
not sure why this is an invalid email
Dogster dogster_351A7140D2F608917B168757AC6E2E47911F5D180AD881092669F00B7081D5F5@reply.dogster.com
This is coming directly from an email header. Is it the code or is it indeed invalid?
It would be good to do a little refactoring to improve our scrutinizer rating.
One concern of mine is if I modularize things too much that the performance of the code may suffer as a result due to things like function-call overhead in tight loops, nevertheless it's probably less than simple to maintain at this point.
Although there is plenty of complex code in things like say "gcc" or other tools that are the bread and butter of our industry, so it may make sense to let it be and focus more on test coverage...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.