Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.788
diff -u -r1.788 common.inc
--- includes/common.inc	21 Aug 2008 19:36:36 -0000	1.788
+++ includes/common.inc	26 Aug 2008 12:05:30 -0000
@@ -823,6 +823,7 @@
 /**
  * Verify the syntax of the given e-mail address.
  *
+ * Valid formats: "display name" <addr-spec> / addr-spec.
  * Empty e-mail addresses are allowed. See RFC 2822 for details.
  *
  * @param $mail
@@ -831,12 +832,14 @@
  *   TRUE if the address is in a valid format.
  */
 function valid_email_address($mail) {
+  $name = '((?:"[^\"\f\n\r\t\v]+" <))?';
+  $angle = '(?(1)>)';
   $user = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+';
   $domain = '(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.?)+';
   $ipv4 = '[0-9]{1,3}(\.[0-9]{1,3}){3}';
   $ipv6 = '[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7}';
 
-  return (bool)preg_match("/^$user@($domain|(\[($ipv4|$ipv6)\]))$/", $mail);
+  return (bool)preg_match("/^$name$user@($domain|(\[($ipv4|$ipv6)\]))$angle$/", $mail);  
 }
 
 /**
