Send Using Google App SMTP Account

Hi and of course I can’t thank the phplist team enough for this wonderful package!

I’ve recently moved from using the native mail server on my shared server (which is constantly getting blacklisted) to using google apps (for $5/month per user). Incidentally, it’s also magnificently reduced spam into my inbox.

I’m hoping to get some insights into what I’m doing wrong in changing the phplist configs to work properly with the gmail smtp server.

Based on this StackOverflow post, updated the config/config.php file with:

$phpmailer_smtpuser = '';
$phpmailer_smtppassword = 'password';

But the test email is failing and event log reports:

Error sending email to SMTP connect() failed.

I’m not actually sure where to look to see where the bottleneck is. How can I tell if we’re connecting with the google SMTP server, for example.

Am expecting that this forum post from 2008, is fairly out of date.

These settings for port and secure work for me

define('PHPMAILER_SECURE', 'ssl');

define('PHPMAILERPORT', 465);

but also ensure that the port is not being blocked.

Blocked by my own local server?

I don’t know your environment, but I have seen this problem when the cause was the outgoing port being blocked. If the user and password are correct then that is a likely cause.

Thanks. I’ve just emailed the admins to ask about that port.

That port had been closed, and now that the good people at WebHostingBuzz have opened it, we’re in business!

1 Like

Hi @mikeill it’s no use to setting your smtp on your config file alone. You won’t get anywhere. You got to make changes on class.phplistmailer.php and also in your PHPMailer directory, you need to add codes on class.smtp.php.

Thank you for the update, Maxwell. Emails have been sending, albeit very slowly. I’m not sure if this has to do with not having updated class.phplistmailer.php and class.smtp.php.

As notes in this tutorial, class.phplistmailer.php is located in the admin/PHPMailer/ directory, as is class.smtp.php (which only seemed to have a variable setting for the port.

I’m guessing I will need to either keep these files separate when upgrading, or repeat the process upon upgrade.