How to configure SMTP Gmail settings

Solutions for other phpList version 2 users
Forum rules
Please do not ask questions here, this is for Solutions you have discovered or come across.

How to configure SMTP Gmail settings

Postby shikhar » 1:27pm, Thu 22 Sep, 2011

Dear All,

I am newbe for PHPList i have set it up for my need of mass mail.

I noted that every mail i sent, is showing at receiving point via default mail server name. But.....

I want to send all the mails via SMTP Gmail system.

I tried to configure SMTP settings through following liks:

viewtopic.php?t=17376
http://www.patchworkoftips.com/send-php ... -smtp/262/

But did't get resolve the problem.



Any help! If some one know please share.


shikhar
shikhar
phpLister
 
Posts: 6
Joined: 1:18pm, Thu 22 Sep, 2011

Re: How to configure SMTP Gmail settings

Postby duncanc » 7:12am, Fri 23 Sep, 2011

This topic provides correct instructions on what to change, as I have just followed them,
http://forums.phplist.com/viewtopic.php?f=6&t=17376&start=30#p67241

a few minor changes
For clarity the change to class.phplistmailer.php in phplist version 2.10.16 starting at line 38 is
Code: Select all
        if ( isset($GLOBALS['phpmailer_smtpuser']) && $GLOBALS['phpmailer_smtpuser'] != ''
             && isset($GLOBALS['phpmailer_smtppassword']) && $GLOBALS['phpmailer_smtppassword']) {

          $this->SMTPAuth = true;
          $this->Username = $GLOBALS['phpmailer_smtpuser'];
          $this->Password = $GLOBALS['phpmailer_smtppassword'];
          $this->SMTPSecure = $GLOBALS['phpmailer_smtpsecure'];
          $this->Port = $GLOBALS['phpmailer_smtpport'];
        }
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: How to configure SMTP Gmail settings

Postby jrcarranza » 5:28pm, Tue 27 Sep, 2011

the problem are when you have a big lists, because gmail permit to send 500 messages by day.
jrcarranza
phpLister
 
Posts: 14
Joined: 5:10pm, Tue 27 Sep, 2011

Re: How to configure SMTP Gmail settings

Postby shikhar » 5:00pm, Thu 29 Sep, 2011

Thank you jrcarranza & duncanc for your response.


This is a great help for me to configure the Gmail smtp settings.

There is one more thing i have to solve is

phplist keeps sending messages from your web server, even after you shut down your computer.

As i read this on http://www.phplist.com/details

Please share with me If you have any idea of how to do that. I am also searching the solution meanwhile.


Thank you once again.

shikhar
shikhar
phpLister
 
Posts: 6
Joined: 1:18pm, Thu 22 Sep, 2011

Re: How to configure SMTP Gmail settings

Postby truman11 » 12:17am, Fri 30 Sep, 2011

Hey guys, this is my first post here, hopefully somebody can help me. I`ve followed lots of howtos configure Gmail / Google App and use it as my SMTP (including the one suggested by duncanc) but I still get this error: "Mailer Error: SMTP Error: Could not connect to SMTP host".

This is my setup and how my files looks:

I`m using phplist 2.10.17 version and I`ve replaced lists/admin/phpmailer with the content of PHPMailer_v5.1.

config.php:

Code: Select all
define ("TEST",0);

define("PHPMAILERHOST",'smtp.gmail.com'); #I`ve also tried with ssl://smtp.gmail.com
$phpmailer_smtpuser = 'xxx@mydomain.com';  #I`m using my Google App account
$phpmailer_smtppassword = 'mypassword';
$phpmailer_smtpsecure = 'ssl';
$phpmailer_smtpport = 465;   # I also tried with TLS and 587


class.phplistmailer.php:
Code: Select all
 if (defined('PHPMAILERHOST') && PHPMAILERHOST != '') {
        //logEvent('Sending email via '.PHPMAILERHOST);
        $this->Helo = getConfig("website");
        $this->Host = PHPMAILERHOST;
       if ( isset($GLOBALS['phpmailer_smtpuser']) && $GLOBALS['phpmailer_smtpuser'] != ''
             && isset($GLOBALS['phpmailer_smtppassword']) && $GLOBALS['phpmailer_smtppassword']) {

          $this->SMTPAuth = true;
          $this->Username = $GLOBALS['phpmailer_smtpuser'];
          $this->Password = $GLOBALS['phpmailer_smtppassword'];
          $this->SMTPSecure = $GLOBALS['phpmailer_smtpsecure'];
          $this->Port = $GLOBALS['phpmailer_smtpport'];
        }
        $this->Mailer = "smtp";
      } else{
         #  logEvent('Sending via mail');
         $this->Mailer = "mail";
      }

      //$ip = gethostbyname($this->Host);


Any ideas? What I`m a missing or doing wrong? These are some ideas that I have read around but I haven`t checked them.

- Check that your Port 995 is open for outgoing connections.
- Request your webhost to enable fsockopen() for port 465.
- Check that php is compiled with support for OpenSSL.

Do you guys think any of them can be my problem or it is something else? Thanks!
truman11
phpList newbie
 
Posts: 4
Joined: 11:39pm, Thu 29 Sep, 2011

Re: How to configure SMTP Gmail settings

Postby jrcarranza » 4:56pm, Fri 30 Sep, 2011

on the logs said some error?
jrcarranza
phpLister
 
Posts: 14
Joined: 5:10pm, Tue 27 Sep, 2011

Re: How to configure SMTP Gmail settings

Postby truman11 » 6:37pm, Fri 30 Sep, 2011

Thanks for your reply jrcarranza. The error that the eventlog (in phplist admin panel) shows is "Mailer Error: SMTP Error: Could not connect to SMTP host".
truman11
phpList newbie
 
Posts: 4
Joined: 11:39pm, Thu 29 Sep, 2011

Re: How to configure SMTP Gmail settings

Postby thomasp » 3:06pm, Sun 02 Oct, 2011

Hi,

I'm trying to configure my PHPlist for GMail, and am really confused as to what bits I need to add where in the phplistmailer.php file - please can someone give me a clear, step-by-step guide of exactly what needs to be added and where to allow sending messages via Gmail?

Thanks for the help.
thomasp
phpList newbie
 
Posts: 1
Joined: 3:04pm, Sun 02 Oct, 2011

Re: How to configure SMTP Gmail settings

Postby lotsenturm » 7:08pm, Wed 26 Oct, 2011

Hi!
I am also trying to set up phplist 2.10.17 with googlemail.
The reason ist that I need to see all outgoing emails in the outbox.
I tryed about every solution available on this subject; but none worked so far.
This is the environment:
- phplist 2.10.17
- Installed on a 1und1 hosted domain
- Googlemail for Business
Thanks for any solution!! and Greetings!!
lotsenturm
phpList newbie
 
Posts: 1
Joined: 6:59pm, Wed 26 Oct, 2011

Re: How to configure SMTP Gmail settings

Postby keb » 3:35am, Mon 09 Apr, 2012

truman11's instructions above are working fine for me with Google Apps mail and phplist 2.10.18
i downloaded PHPMailer 5.2.1 from its new home at http://code.google.com/a/apache-extras.org/p/phpmailer/ and replaced the contents of lists/admin/phpmailer with it.
keb
phpList newbie
 
Posts: 2
Joined: 2:14am, Fri 14 Oct, 2011


Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest