--- messaging_phpmailer.module	2009-01-30 11:57:31.000000000 -0700
+++ \wamp\www\training\sites\default\modules\messaging\messaging_phpmailer\messaging_phpmailer.module	2009-03-06 12:11:40.031250000 -0700
@@ -78,7 +78,14 @@ function messaging_phpmailer_drupal_mail
 
   // Add some headers. Look for rfc2822 "From" formatting (ex: "name" <foo@bar.com>)
   $from = array();
-  preg_match('/["\']?(?<name>.*)["\']? <(?<email>.*)>/', $message['headers']['From'], $from);
+//  preg_match('/["\']?(?<name>.*)["\']? <(?<email>.*)>/', $message['headers']['From'], $from);
+  preg_match('/["\']?(.*)["\']? <(.*)>/', $message['headers']['From'], $from);
+  if (!empty($from[1])) {
+    $from['name'] = $from[1];
+  }
+  if (!empty($from[2])) {
+    $from['email'] = $from[2];
+  }
   $mail->From = !empty($from['email']) ? $from['email'] : $message['headers']['From'];
   $mail->FromName = !empty($from['name']) ? $from['name'] : '';
   $mail->AddAddress($message['to']);
