Skip to content
Snippets Groups Projects
Commit d530a62a authored by Andreas Gohr's avatar Andreas Gohr
Browse files

readded email patterns -> fixes email links broken with yesterdays validator switch

darcs-hash:20081012132714-7ad00-39316b19200fc122bdd4f780235e25a9fea09932.gz
parent 2cff5827
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,24 @@
if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n");
#define('MAILHEADER_ASCIIONLY',1);
/**
* Patterns for use in email detection and validation
*
* NOTE: there is an unquoted '/' in RFC2822_ATEXT, it must remain unquoted to be used in the parser
* the pattern uses non-capturing groups as captured groups aren't allowed in the parser
* select pattern delimiters with care!
*
* May not be completly RFC conform!
* @link http://www.faqs.org/rfcs/rfc2822.html (paras 3.4.1 & 3.2.4)
*
* @author Chris Smith <chris@jalakai.co.uk>
* Check if a given mail address is valid
*/
if (!defined('RFC2822_ATEXT')) define('RFC2822_ATEXT',"0-9a-zA-Z!#$%&'*+/=?^_`{|}~-");
if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['.RFC2822_ATEXT.']+(?:\.['.RFC2822_ATEXT.']+)*@(?i:[0-9a-z][0-9a-z-]*\.)+(?i:[a-z]{2,4}|museum|travel)');
/**
* UTF-8 autoencoding replacement for PHPs mail function
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment