Index: messaging.module =================================================================== --- messaging.module (revision 21) +++ messaging.module (working copy) @@ -219,7 +219,7 @@ // Get default sending method, or default for this user account $method = $method ? $method : messaging_method_default(NULL); $info = messaging_method_info($method, NULL, array()); - + // Convert into an object and add all the information into the message object $message = (object)$message; $message->method = $method; @@ -860,6 +860,7 @@ 'subject' => $message->subject, 'body' => $message->body, 'headers' => messaging_mail_headers($message, $params), + 'attachment' => $message->attachment ); // Invoke hook_mail_alter() to allow all modules to alter the resulting e-mail. Index: messaging_phpmailer/messaging_phpmailer.module =================================================================== --- messaging_phpmailer/messaging_phpmailer.module (revision 21) +++ messaging_phpmailer/messaging_phpmailer.module (working copy) @@ -47,7 +47,6 @@ */ function messaging_phpmailer_send_msg($destination, $message, $params = array()) { $mail = messaging_mail_prepare($destination, $message, $params); - return messaging_phpmailer_drupal_mail($mail); } @@ -95,6 +94,11 @@ // The subject has been already filtered by messaging module $mail->Subject = $subject; $mail->Body = str_replace("\r", '', $body); + + if(!empty($message['attachment'])) { + $mail->AddAttachment($message['attachment']); + } + return $mail->Send(); }