Index: messaging_phpmailer.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/messaging/messaging_phpmailer/Attic/messaging_phpmailer.module,v
retrieving revision 1.1.2.10.2.10
diff -u -p -r1.1.2.10.2.10 messaging_phpmailer.module
--- messaging_phpmailer.module	16 Dec 2008 15:00:30 -0000	1.1.2.10.2.10
+++ messaging_phpmailer.module	19 Dec 2008 19:05:48 -0000
@@ -76,9 +76,12 @@ function messaging_phpmailer_drupal_mail
   // Theme the mail message
   list($subject, $body) = theme('messaging_phpmailer', $message);
 
+  // Look for rfc2822 "From" formatting (ex: "name" <foo@bar.com>)
+  preg_match('/["\']?(?<name>.*)["\']? <(?<email>.*)>/', $message['headers']['From'], $from);
+  
   // Add some headers
-  $mail->From = $message['headers']['From'];
-  $mail->FromName = $message['headers']['From'];
+  $mail->From = $from['email'] ? $from['email'] : $message['headers']['From'];
+  $mail->FromName = $from['name'] ? $from['name'] : $message['headers']['From'];
   $mail->AddAddress($message['to']);
 
   // Strip HTML out of $body for plaintext equivalent of HTML email.
