Has anyone used PHPMailer_v5.0.0.tar with SMTP Module?

Comments

billnbell’s picture

I got it to work - but it really needs someone to verify.

cat smtp.patch
--- sites/all/modules/smtp/smtp.module  2009-05-19 14:33:08.000000000 -0600
+++ sites/all/modules/smtp/smtp2.module 2009-05-19 14:23:13.000000000 -0600
@@ -313,9 +313,10 @@ function drupal_mail_wrapper($message) {
   }

   // Defines the From value to what we expect.
-  $mail->From     = $from;
-  $mail->FromName = $from_name;
-  $mail->Sender   = $from;
+  $mail->SetFrom($from, $from_name);
+  $mail->AddReplyTo($from, $from_name);
+//  $mail->FromName = $from_name;
+ // $mail->Sender   = $from;


   // Create the list of 'To:' recipients.
@@ -634,6 +635,7 @@ function drupal_mail_wrapper($message) {

   // If username and password are given, use SMTP authentication.
   if ($username != '' && $password != '') {
+    $mail->IsSMTP();
     $mail->SMTPAuth = TRUE;
     $mail->Username = $username;
     $mail->Password = $password;


Swift Arrow’s picture

I've just downloaded this and it's not working no matter what I do. I'm going to try this patch, but i have to learn how to use it first!

Swift Arrow’s picture

Status: Active » Needs work

I tried these patches, and it didn't remove the Cannot connect to SMTP server error. I have checked all my settings numerous times, and am quite sure they are not the issue. I am trying to use Google Apps, but have also tried with my normal gmail account. Both give the same problem.

@billnbell, have you managed to get it working? Would like to know...
Thanks!

billnbell’s picture

It is working with 6.12 Drupal.

I have not tried it with Gmail or Apps. There might be other issues.

wundo’s picture

Issue summary: View changes
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.