diff --git exim_og_mailinglist/og_mailinglist_exim4_transport.php exim_og_mailinglist/og_mailinglist_exim4_transport.php
index 3ba5a90..6a2a97a 100755
--- exim_og_mailinglist/og_mailinglist_exim4_transport.php
+++ exim_og_mailinglist/og_mailinglist_exim4_transport.php
@@ -1,4 +1,4 @@
-#!/usr/bin/php
+#!/usr/bin/php -q
 <?php
 
 // Reads in raw email off the STDIN and posts the email using our curl command for the appropriate site.
@@ -35,7 +35,7 @@ $token = md5($validation_string . $raw_email);
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, FALSE);
 curl_setopt($ch, CURLOPT_POST, 1);
-curl_setopt($ch, CURLOPT_HEADER, 1);
+curl_setopt($ch, CURLOPT_HEADER, 0);
 curl_setopt($ch, CURLOPT_URL, $post_url);
 
 //prepare the field values being posted to the service
diff --git og_mailinglist.install og_mailinglist.install
index 6e42655..2cc8c26 100644
--- og_mailinglist.install
+++ og_mailinglist.install
@@ -1,5 +1,6 @@
 <?php
 // $Id$
+include_once 'og_mailinglist_utilities.inc'; //needed to the hook_requirements to work right
 /**
  * Implementation of hook_install().
  */
diff --git og_mailinglist_api.inc og_mailinglist_api.inc
index d2deb30..ff40c61 100644
--- og_mailinglist_api.inc
+++ og_mailinglist_api.inc
@@ -188,7 +188,9 @@ function og_mailinglist_log_email_sent($source, $nid, $cid = 0, $message_id = 0,
  */
 function og_mailinglist_create_mailer() {
   og_mailinglist_phpmailer_load_library();
-  $mailer = new PHPMailer(TRUE); // The TRUE param means it will throw exceptions on errors, which we need to catch.
+  module_load_include('inc', 'og_mailinglist', 'og_mailinglist_phpmailer_class');
+  $mailer = new OGMailinglistPHPMailer(TRUE); // The TRUE param means it will throw exceptions on errors, which we need to catch.
+  $mailer->PluginDir = og_mailinglist_get_phpmailer_plugin_dir();
   $mailer->CharSet = 'UTF-8';
 
   return $mailer;
diff --git og_mailinglist_transport.inc og_mailinglist_transport.inc
index 3470ded..2829e3c 100755
--- og_mailinglist_transport.inc
+++ og_mailinglist_transport.inc
@@ -351,10 +351,12 @@ function _og_mailinglist_email_node_email($email, $node) {
   $email = _og_mailinglist_rewrite_headers($email, $node, TRUE);
   $footer = _og_mailinglist_build_footer($node);
   $email = _og_mailinglist_add_footer($email, $footer);
+  $headers = $email['structure']->headers;
+  unset($email['structure']->headers);
   $email['new_email_text'] = _og_mailinglist_encode_email(array($email['structure']));
   
   // Send it off.
-  _og_mailinglist_send_raw_email($email['new_email_text']);
+  _og_mailinglist_send_raw_email($headers, $email['new_email_text'], $node);
 
   // If the sender's subscription type isn't email, give him a thread subscription.
   if (og_mailinglist_get_group_subscription_type($node->og_groups[0], $node->uid) != "email") {
@@ -367,10 +369,12 @@ function _og_mailinglist_email_comment_email($email, $node, $comment) {
   $email = _og_mailinglist_rewrite_headers($email, $node, FALSE, $comment);
   $footer = _og_mailinglist_build_footer($node);
   $email = _og_mailinglist_add_footer($email, $footer);
+  $headers = $email['structure']->headers;
+  unset($email['structure']->headers);
   $email['new_email_text'] = _og_mailinglist_encode_email(array($email['structure']));
   
   // Send it off.
-  _og_mailinglist_send_raw_email($email['new_email_text']);
+  _og_mailinglist_send_raw_email($headers, $email['new_email_text'], $node);
 }
 
 function _og_mailinglist_parse_email($email) {
@@ -704,9 +708,7 @@ function _og_mailinglist_rewrite_headers($email, $node, $new_node = FALSE, $comm
   
   $new_headers['from'] = $headers['from'];
   $new_headers['to'] = $group_node->ogm_email . "@" . variable_get('og_mailinglist_server_string', 'example.com');
-  $new_headers['bcc'] =
-    array_to_comma_delimited_string(
-      _og_mailinglist_get_subscribers($node, $new_node));
+  $new_headers['bcc'] = _og_mailinglist_get_subscribers($node, $new_node);
   $new_headers['content-type'] = $headers['content-type'];
   $new_headers['content-transfer-encoding'] =  $headers['content-transfer-encoding'];
   
@@ -816,10 +818,65 @@ function _og_mailinglist_add_footer($email, $footer) {
   return $email;
 }
 
-function _og_mailinglist_send_raw_email($raw_email) {
-  $rand_filename = rand(1000, 10000000000);
-  file_put_contents("/tmp/" . $rand_filename, $raw_email . "\n");
-  system("/usr/sbin/sendmail -t < /tmp/" . $rand_filename);
+function _og_mailinglist_send_raw_email($headers, $body, $node) {
+  $mailer = og_mailinglist_create_mailer();
+  //$mailer->SMTPDebug  = 2;
+  $mailer->ClearAddresses();
+
+  foreach($headers as $key => $value) {
+    switch ($key) {
+      case 'date':
+	$mailer->MessageDate = $value;
+        break;
+      case 'Message-ID':
+        $mailer->MessageID = $value;
+        break;
+      case 'subject':
+	$mailer->Subject = $value;
+        break;
+      case 'to':
+        if (preg_match("/(^<)*<(.*?)>/", $value, $matches)) { 
+          $mailer->AddAddress($matches[1], $matches[2]);
+        } else
+          $mailer->AddAddress($value);
+        break;
+      case 'cc':
+        if (preg_match("/(^<)*<(.*?)>/", $value, $matches)) { 
+          $mailer->AddCC($matches[1], $matches[2]);
+        } else
+          $mailer->AddCC($value);
+        break;
+      case 'bcc':
+	//print_r($value);
+        foreach($value as $recipient) {
+          $mailer->AddDeliverTo($recipient);
+        }
+        break;
+      case 'from':
+        if (preg_match("/([^<]*)<(.*?)>/", $value, $matches)) { 
+          $mailer->From = $matches[2];
+          $mailer->FromName = $matches[1];
+        } else
+          $mailer->From = $value;
+        break;
+      default:
+        $mailer->AddCustomHeader($key . ':' . $value);
+    }
+  }
+
+  $mailer->Body = $body;
+
+  $success = $mailer->Send();
+  
+  if ($success) {
+    $parent_message_id = _og_mailinglist_get_thread_parent_messageid($email['headers']['in-reply-to']);
+    og_mailinglist_log_email_sent('web', $node->nid, $comment->cid, $mailer->MessageID, $headers['in_reply_to'], $headers['References'], $parent_message_id);
+  }
+  else {
+    watchdog('og_mailinglist', "OG_Mailinglist couldn't send a new node email.", NULL,
+             WATCHDOG_ERROR);
+  }
+  
 }
 
 /*
diff --git og_mailinglist_utilities.inc og_mailinglist_utilities.inc
index b9bb1f1..54fff88 100644
--- og_mailinglist_utilities.inc
+++ og_mailinglist_utilities.inc
@@ -274,13 +274,28 @@ function og_mailinglist_phpmailer_load_library() {
   return class_exists('PHPMailer');
 }
 
+/**
+ * Gets the directory in which PHPMailer is stored (for plugins)
+ *
+ * @return
+ *  TRUE if the PHPMailer library is loaded, FALSE otherwise.
+ */
+function og_mailinglist_get_phpmailer_plugin_dir() {
+  // First, try using libraries module.
+  if (module_exists('libraries')) {
+    // Let's see if PHPMailer is really available from libraries.
+    return './'. libraries_get_path('phpmailer') . '/';
+  }
+  return './'. drupal_get_path('module', 'og_mailinglist') .'/phpmailer/';
+}
+
 function og_mailinglist_mimeDecode_load_library() {
   if (!class_exists('Mail_mimeDecode')) {
   //check the standard include path for the file first
     include_once('Mail/mimeDecode.php');
  
     if (!class_exists('Mail_mimeDecode')) {
-    //next we'll try grabbing the file from a few default pear install locations.
+     //next we'll try grabbing the file from a few default pear install locations.
      if (file_exists('Mail/mimeDecode.php')) {
        include_once('Mail/mimeDecode.php');
      }
