Index: includes/mail.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/mail.inc,v retrieving revision 1.8 diff -u -p -r1.8 mail.inc --- includes/mail.inc 25 Jan 2008 17:04:00 -0000 1.8 +++ includes/mail.inc 7 Feb 2008 17:16:04 -0000 @@ -82,6 +82,10 @@ */ function drupal_mail($module, $key, $to, $language, $params = array(), $from = NULL, $send = TRUE) { $default_from = variable_get('site_mail', ini_get('sendmail_from')); + // The ini variable may not conform to the addr-spec format site_mail has. A check is needed. + if (valid_email_address($default_from)) { + $default_from = '"'. variable_get('site_name', 'Drupal') .'" <'. $default_from .'>'; + } // Bundle up the variables into a structured array for altering. $message = array(