Gmail & Phplist

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.

Gmail & Phplist

Postby Threeboy » 1:26pm, Fri 09 Mar, 2007

Scrubbing these forums I've figured out how to use gmail (or google apps hosted domain emails) with phplist to process bounces.

PROCESSING BOUNCES (incoming)

In config/config.php:

Code: Select all
$bounce_mailbox_host = 'pop.gmail.com';
$bounce_mailbox_user = 'username@gmail.com';
$bounce_mailbox_password = '********';
$bounce_mailbox_port = "995/pop3/ssl";


and in admin/processbounces.php:

find this:

Code: Select all
  if (!$port) {
    $port = '110/pop3/notls';
  }


and replace it with this:

Code: Select all
#if (!$port) {
  $port = '995/pop3/ssl';
  #}


works for me.

---

SENDING MAIL (outgoing)

Now I can't seem to figure out how to configure php to use SMTP and to be compatible with gmail.

The google mail info is quite straightforward:

SMTP: smtp.gmail.com
USER: username@gmail.com
PORT: 465 (SSL)

It needs to be SSL - that's the main hang-up, any idea how to get that working in phplist? What file do I edit? the FAQ says to change the port you use $phpmailer_smtpport = 'xxx'; but that doesn't take care of the SSL.

Help?

:D
Threeboy
phpList newbie
 
Posts: 2
Joined: 12:57pm, Fri 09 Mar, 2007

Postby H2B2 » 1:57pm, Fri 09 Mar, 2007

I don't think phpmailer supports SSL.
Ref:
- http://mantis.phplist.com/view.php?id=9160
- http://news.hping.org/comp.lang.php.archive/15252.html

You might search the web for possible fixes, though I don't know whether you'll find any.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby Threeboy » 2:08pm, Fri 09 Mar, 2007

Hmm.

Think anyone can explain to me how to use this then?

http://www.vulgarisoip.com/?p=17
Threeboy
phpList newbie
 
Posts: 2
Joined: 12:57pm, Fri 09 Mar, 2007

more complete gmail and phplist instructions

Postby momotiki » 12:12pm, Wed 28 Mar, 2007

I was in a rush and so happy that I got gmail working that I didn't post more detailed instructions. Here they are.

The settings below are what you need to edit in config.php

I have it set up for google apps for your domain. If you were just using gmail I'm not sure if your username would just be username or username@gmail.com

NOTE: I haven't tried especially large mailings with this yet, so I have no idea what gmail's limits are for sending. I would try it out on a low throttle first. My list is under six hundred so I'm just going to try 100 an hour at first. But so far I have just tested this on 20 users or so, and it worked fine.

Code: Select all
define("PHPMAILER",1);
# To use a SMTP please give your server hostname here, leave it blank to use the standard
# PHP mail() command.
define("PHPMAILERHOST",'ssl://smtp.gmail.com');
# if you want to use smtp authentication when sending the email uncomment the following
# two lines and set the username and password to be the correct ones
$phpmailer_smtpuser = 'username@yourdomain.org';
$phpmailer_smtppassword = 'yourpassword';
$phpmailer_smtpport = '465'
momotiki
phpLister
 
Posts: 12
Joined: 12:09pm, Fri 23 Feb, 2007

Postby benjibot » 1:56pm, Thu 29 Mar, 2007

Yay! You are my current hero! I had just about given up on being able to set up a mailing list while keeping my email with Google Apps!

One question, does this solution require the modified classes from http://www.vulgarisoip.com/index.php?s=gmail?
benjibot
phpList newbie
 
Posts: 4
Joined: 1:52pm, Thu 29 Mar, 2007

phplist and gmail continued

Postby momotiki » 4:16pm, Thu 29 Mar, 2007

The answer is, I'm not sure. It shouldn't, because I think these are all the settings that those custom files included. However I was really sloppy when I was setting mine up, and so I first used the files he provided, realized that there were some settings that didn't work with how phplist expects to call phpmailer, fixed those, and then it started working.

So basically, it is possible that I am using some weird hybrid setup, but I think I managed to change everything back accidentally so I was using a normal phpmailer class.

Go ahead and try it just with my recommended settings from the previous post and then if that doesn't work, PM me and I'll send you my mangled files from the vulgar blog.
momotiki
phpLister
 
Posts: 12
Joined: 12:09pm, Fri 23 Feb, 2007

google apps and mailing lists

Postby momotiki » 4:22pm, Thu 29 Mar, 2007

One more point. I recently discovered that if you wanted you could use google groups, and mask the fact that you are doing so using google apps for your domain.

In google apps, create an alias, like newsletter@yourdomain.com and then have that send to the post email of a google group (say, yourcompany-newsletter@googlegroups.com). If you do your group settings right, people will never realize that their emails are being sent through google groups. It provides bounce processing, but not much else in terms of what you would want out of newsletter management, although it does let you create custom pages, so maybe you jury rig something together.

It's nowhere near as powerful as phplist, but you're much less likely to get a sector 5 error from google. Just some thoughts on google and newsletters.
momotiki
phpLister
 
Posts: 12
Joined: 12:09pm, Fri 23 Feb, 2007

Re: google apps and mailing lists

Postby benjibot » 4:45pm, Thu 29 Mar, 2007

momotiki wrote:One more point. I recently discovered that if you wanted you could use google groups, and mask the fact that you are doing so using google apps for your domain.


You know, that was my alternative idea but I having no experience with Google Groups I didn't know if it would work. That was my biggest concern. I thought it might look "cheap" if the mailing list were routed through some sort of group system. I'd been searching for just this answer all morning but not finding anything on account of the Google Apps themselves being so popular with blogs that I just found reviews.

I think, if I can't get phplist to work, that the Groups solution would be just fine with my friend. I'm setting this up as a mailing list for his record label. That's why I signed up for Google Apps in the first place. He won't use the @domain address he has because he's so used to gmail. I want him to use his own domain to make email look more official.
benjibot
phpList newbie
 
Posts: 4
Joined: 1:52pm, Thu 29 Mar, 2007

SMTP OK - But POP3 not working With Gmail

Postby Fawess » 7:54pm, Fri 25 May, 2007

Hi There!

I'm using Phplist 2.10.2 (I know it's getting old, but it works great still! Although minor modifications were made to patch PHP's vulnerabilities with registerglobals)

Now to my problem at hand :
I've followed your precious advices on how to setup Gmail POP and SMTP but only the SMTP is working!

SMTP : - WORKS FINE - NO NEED FOR EXTRA LIBRARIES!

Code: Select all
define("PHPMAILER",1);
# To use a SMTP please give your server hostname here, leave it blank to use the standard
# PHP mail() command.
define("PHPMAILERHOST",'ssl://smtp.gmail.com');
# if you want to use smtp authentication when sending the email uncomment the following
# two lines and set the username and password to be the correct ones
$phpmailer_smtpuser = 'username@yourdomain.org';
$phpmailer_smtppassword = 'yourpassword';
$phpmailer_smtpport = '465';


Now POP using these settings : - GIVES ME CERTIFICATE ERRORS -

Code: Select all
$bounce_mailbox_host = 'pop.gmail.com';
$bounce_mailbox_user = 'username@gmail.com';
$bounce_mailbox_password = '********';
$bounce_mailbox_port = "995/pop3/ssl";


And in admin/processbounces.php , I changed this :
Code: Select all
  if (!$port) {
    $port = '110/pop3/notls';
  }

By this :
Code: Select all
  if (!$port) {
    $port = '995/pop3/ssl';
  }


Now the error I get when fetching bounces is :
Code: Select all
Cannot create POP3 connection to pop.gmail.com: Certificate failure for pop.gmail.com: unable to get local issuer certificate: /C=US/ST=California/L=Mountain View/O=Google Inc./CN=pop.gmail.com
Identifying consecutive bounces
Nothing to do
Identifying consecutive bounces
0 users processed


Can someone tell what else needs to be done to make this puppy work?
Fawess
phpLister
 
Posts: 8
Joined: 8:24pm, Thu 31 Aug, 2006

Got the fix for the POP3

Postby Fawess » 2:21am, Sat 26 May, 2007

Finally, something that works for fetching POP3 through Gmail :

- All we need to do is to bypass certificate validation (I know this seems a bit unsecure but Hey! We were using plain text all this time!

Code: Select all
$bounce_mailbox_host = 'pop.gmail.com';
$bounce_mailbox_user = 'username@gmail.com';
$bounce_mailbox_password = '********';
$bounce_mailbox_port = "995/pop3/ssl/novalidate-cert" ;


and obviously, change this suspicious piece of code :

Code: Select all
  if (!$port) {
    $port = '110/pop3/notls';
  }


By this one :

Code: Select all
  if (!$port) {
    $port = '995/pop3/ssl/novalidate-cert';
  }
Fawess
phpLister
 
Posts: 8
Joined: 8:24pm, Thu 31 Aug, 2006

Errors when sending

Postby msantore » 3:40am, Fri 22 Jun, 2007

Hey everyone,

PHPList looks great! just trying to get over 1 hurdle. When I try to send a message to my list I get the following errors in the event log.

Mailer Error: The following From address failed: marketing@domain.co-m

and

Mailer Error: Language string failed to load: from_failedmarketing@domain.co-m


Any ideas?

Config.php is NOT in test mode, SMTP setting ARE set.

* -'s added so i could post info
msantore
phpList newbie
 
Posts: 3
Joined: 3:33am, Fri 22 Jun, 2007

Postby H2B2 » 2:43pm, Fri 22 Jun, 2007

When using SMTP you should be aware of this bug report: take a look at this report: http://mantis.phplist.com/view.php?id=8590
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby msantore » 5:59pm, Fri 22 Jun, 2007

Tried that still no luck =(

Replaced that line of code on class.phpmailer.php so it looks like this:

if (!$this->Host) {
$this->Mailer = "mail";
# logEvent('Sending via mail');
} else {
$this->Mailer = "smtp";
# logEvent('Sending via smtp');
}
}

Any ideas?
msantore
phpList newbie
 
Posts: 3
Joined: 3:33am, Fri 22 Jun, 2007

Re: Errors when sending

Postby H2B2 » 12:57pm, Sat 23 Jun, 2007

msantore wrote:Mailer Error: The following From address failed: marketing@domain.com

Does that From address actually exist as a real mailbox?
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby msantore » 5:43pm, Mon 25 Jun, 2007

Yeah, it is the account i authenticate with using SMTP
msantore
phpList newbie
 
Posts: 3
Joined: 3:33am, Fri 22 Jun, 2007

Next

Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: Google [Bot] and 0 guests