We are using notifications to drive users to our app and are setting up gmail for our domain to handle all email traffic. However, PHPMailer cannot connect to GMail's SMTP server, the PHPMailer module does have support for this (see http://drupal.org/project/phpmailer) Is it possible to configure Messaging's use of PHPMailer to talk to GMail's SMTP for email sending?

Comments

tstackhouse’s picture

I've managed to make a tweak to get this working, adding the following at line 148 in messaging_phpmailer/messaging_phpmailer.module makes gmail work:

  if ($host == 'smtp.gmail.com') { //if we're sending via gmail, make some settings adjustments
    $mail->SMTPSecure = "ssl";
    $mail->Port = 465;
  }
jose reyero’s picture

Category: support » feature
Status: Active » Needs review
jose reyero’s picture

Status: Needs review » Needs work

It needs to be more generic, there are many mail servers out there (secure, port settings)

steveoliver’s picture

The solution in response #1 worked for me. Thanks.

gausarts’s picture

Subscribing. Thanks

foxtrotcharlie’s picture

Version: 6.x-2.1 » 6.x-2.2
Status: Needs work » Needs review
StatusFileSize
new2.17 KB

I also needed this so created a patch for both the current 6.x-2.x-dev and 6.x-2.2 version.

This patch is pretty much a backport of the patch by joshk located in this comment: http://drupal.org/node/813550#comment-3047918

This patch adds configurable SMTP settings:

SSL: None/TLS/SSL
SMTP Port

and enables the module to use these settings, if set.

Attached is the 6.x-2.2 patch.

foxtrotcharlie’s picture

Version: 6.x-2.2 » 6.x-2.x-dev
StatusFileSize
new2.18 KB

And here is the 6.x-2.x-dev patch.

jose reyero’s picture

Status: Needs review » Fixed

Committed, thanks

Status: Fixed » Closed (fixed)

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