Gmail & Phplist

Solutions for other phplisters - Questions go in the questions and problems forum

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
James Dodds III
Threeboy Design
www.threeboy.com
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
phpList Guru
 
Posts: 6566
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
James Dodds III
Threeboy Design
www.threeboy.com
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

Postby ctomasi » 1:23am, Sun 19 Aug, 2007

Thank you for all the great info in this forum. I'm new to PHPlist. My website is hosted through GoDaddy, but my mail is hosted on Gmail.

Despite all my efforts at modifying config/config.php and admin/processbounces.php per this thread, I haven't been able to send a decent test message. All I get is "failed". Can I get more detailed info somewhere? Even the event log is vague.

Somewhere I'm still missing something. My config.php and processbounces.php mirror the previous message (save proper login/password info.)

Thanks.
--Chuck Tomasi
ctomasi
phplist newbie
 
Posts: 4
Joined: 1:15am, Sun 19 Aug, 2007
Location: Appleton Wisconsin

Postby jalvarez » 3:42pm, Fri 07 Sep, 2007

I also got the blank page and I solved it adding a semicolon after:

$phpmailer_smtpport = '465'


So it looks like this:

$phpmailer_smtpport = '465';


I still can't solve my bounce process probem though:

Cannot create POP3 connection to popDOTgmailDOTcom: Can't open mailbox {popDOTgmailDOTcom:995/pop3/ssl}INBOX: invalid remote specification
Identifying consecutive bounces
Nothing to do
Identifying consecutive bounces
0 users processed


Any ideas, anyone?

Regards

Jaime

PS: The DOTs are necessary in order to avoid the URL posting ban on new users...
jalvarez
phplister
 
Posts: 5
Joined: 12:38am, Fri 07 Sep, 2007

Mailer Error: Could not instantiate mail function.

Postby josephlindley » 5:42pm, Fri 07 Sep, 2007

I also had the missing semi-colon... I think it gets missed if you copy and paste out of the forum......

Anyway, it cheered me up to see someone else was that silly :o)

I've also had this error message;

Mailer Error: Could not instantiate mail function.

in the eventlog when I try to send messages.

I've tracked this down to a comment on line 552 of admin/sendemaillib.php. Uncomment this line:

Code: Select all

    #$mail->IsSMTP();




I'm moving on to bounce processing now.....

Joe
josephlindley
phplister
 
Posts: 6
Joined: 12:44am, Thu 06 Sep, 2007

Re: Mailer Error: Could not instantiate mail function.

Postby jalvarez » 6:06pm, Fri 07 Sep, 2007

josephlindley wrote:I also had the missing semi-colon... I think it gets missed if you copy and paste out of the forum......

Anyway, it cheered me up to see someone else was that silly :o)


As I guess we are the majority in this planet, that's the correct way to see this...

It makes you happy all the time!!

Cheers

Jaime
jalvarez
phplister
 
Posts: 5
Joined: 12:38am, Fri 07 Sep, 2007

Postby kev@num » 2:24pm, Fri 26 Oct, 2007

i guess your own server won't be clogged up trying to send 1000's of emails, instead it will be down to gmail servers! I might give this method a go
kev@num
phplister
 
Posts: 9
Joined: 1:00pm, Tue 20 Feb, 2007

Next

Return to Answers, Howtos, Tips & Tricks

Who is online

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