CMSMailer & Google Apps

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
ndes
New Member
New Member
Posts: 2
Joined: Fri Aug 28, 2009 5:21 pm

CMSMailer & Google Apps

Post by ndes »

Hi! Does anyone can work the CMSMailer with Google Apps?? I search a bit and I saw that CMSMailer doesn't support TLS SSL encrypted connections. Does anyone come with a solution? In the future official CMSMailer Module will support encrypted connections??

Thanks
ND.
ndes
New Member
New Member
Posts: 2
Joined: Fri Aug 28, 2009 5:21 pm

Re: CMSMailer & Google Apps

Post by ndes »

Any luck sending via gmail or google apps with CMSms??
big2all
New Member
New Member
Posts: 3
Joined: Sat Sep 12, 2009 6:21 pm

Re: CMSMailer & Google Apps

Post by big2all »

I am also waiting for this :( any workaorund ?
keeval

Re: CMSMailer & Google Apps

Post by keeval »

Same problem.  Anybody knows?
dmgd
Forum Members
Forum Members
Posts: 115
Joined: Tue Jun 06, 2006 1:10 pm
Location: TX

Re: CMSMailer & Google Apps

Post by dmgd »

Sorry I hope I'm hijacking the post but I think we are all on the same page.

I want to send mail through smtp.gmail.com mail server.  This is the Google Apps SMTP email server.  SSL is required and I think this is where the problem is.
Mark
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1942
Joined: Mon Jan 29, 2007 4:47 pm

Re: CMSMailer & Google Apps

Post by Jo Morg »

I had the same issue and, although I didn't test it thoroughly yet, I thing I have found a workaround (it passed the CMSMailler test on the administrator end):

1 - download the latest version of phpmailer here.

2 - upload it to modules/CMSMailer/phpmailer of your CMSMS installation, overwriting the existing version.

3 - Edit CMSMailer.module.php file in line 282, where you find:

Code: Select all

  function reset()
  {
    $this->_load();
    $this->the_mailer->Timeout = $this->GetPreference('timeout');
    $this->the_mailer->Sendmail = $this->GetPreference('sendmail');
    $this->the_mailer->Port   = $this->GetPreference('port');
    $this->the_mailer->Mailer = $this->GetPreference('mailer');
    $this->the_mailer->FromName = $this->GetPreference('fromuser');
    $this->the_mailer->From = $this->GetPreference('from');
    $this->the_mailer->Host = $this->GetPreference('host');
    $this->the_mailer->SMTPAuth = $this->GetPreference('smtpauth');
    $this->the_mailer->Username = $this->GetPreference('username');
    $this->the_mailer->Password = $this->GetPreference('password');
    $this->the_mailer->ClearAddresses();
    $this->the_mailer->ClearAttachments();
    $this->the_mailer->ClearCustomHeaders();
    $this->the_mailer->ClearBCCs();
    $this->the_mailer->ClearCCs();
    $this->the_mailer->ClearReplyTos();
    $charset = $this->GetPreference('charset');
    if( !empty($charset) ) {
      $this->SetCharSet($charset);
    }
  }
 

insert a new line like this:

Code: Select all

  function reset()
  {
    $this->_load();
    $this->the_mailer->Timeout = $this->GetPreference('timeout');
    $this->the_mailer->Sendmail = $this->GetPreference('sendmail');

    $this->the_mailer->SMTPSecure = "ssl"; /*  <-- line to be inserted */

    $this->the_mailer->Port   = $this->GetPreference('port');
    $this->the_mailer->Mailer = $this->GetPreference('mailer');
    $this->the_mailer->FromName = $this->GetPreference('fromuser');
    $this->the_mailer->From = $this->GetPreference('from');
    $this->the_mailer->Host = $this->GetPreference('host');
    $this->the_mailer->SMTPAuth = $this->GetPreference('smtpauth');
    $this->the_mailer->Username = $this->GetPreference('username');
    $this->the_mailer->Password = $this->GetPreference('password');
    $this->the_mailer->ClearAddresses();
    $this->the_mailer->ClearAttachments();
    $this->the_mailer->ClearCustomHeaders();
    $this->the_mailer->ClearBCCs();
    $this->the_mailer->ClearCCs();
    $this->the_mailer->ClearReplyTos();
    $charset = $this->GetPreference('charset');
    if( !empty($charset) ) {
      $this->SetCharSet($charset);
    }
  }


4 - not being a PHP coder myself I'm not sure this needed but it worked for me: on line 553 where you find:

Code: Select all


  function SetHostname( $txt )
  {
    $this->_load();
    $this->the_mailer->Hostname = $txt;
  }

insert a new line like this:

Code: Select all


  function SetHostname( $txt )
  {
    $this->_load();
    $this->the_mailer->Hostname = $txt;

    $this->the_mailer->SMTPSecure = "ssl"; /*  <-- line to be inserted */

  }

5 - make sure you resubmit the form on the administrator side of CMSMailer and that's it!


I did the Test Email Address on this form after the changes and it worked. I'm on my way to test the other modules that need CMSMailer to see if everything is working fine.

Again, I'm not a PHP coder, so this is a bit of hack, and I'm not sure if this was the best way to do it, but I couldn't find a solution anywhere, and had to dig into the code... As long as it works without disrupting anything else, I'm happy.

Hope this helps others with the same problem... ;)
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
hadepeter
New Member
New Member
Posts: 2
Joined: Thu Apr 08, 2010 9:38 am

Re: CMSMailer & Google Apps

Post by hadepeter »

I have the same problem.
My question, where can I find which settings in Extensions --- CMS Mailer that I´m gonna use? Any guide?
JeremyBASS

Re: CMSMailer & Google Apps

Post by JeremyBASS »

First make sure your on cmsms 1.7.1 .. or you can't use google * mail.. next



Outgoing Mail (SMTP) Server - requires TLS or SSL: smtp.gmail.com (use authentication)
Use Authentication: Yes
Port for TLS/STARTTLS: 587
Port for SSL: 465  
Account Name:  your full email address (including @gmail.com or @your_domain.com)  
Email Address:  your email address (username@gmail.com or username@your_domain.com)  
Password:  your Gmail password  


that is it.. HTH Cheers -Jeremy
User avatar
Gu
New Member
New Member
Posts: 7
Joined: Mon Jun 07, 2010 1:50 am

Re: CMSMailer & Google Apps

Post by Gu »

hi, Jeremy

I have upgraded my 1.7 to 1.7.1 and also saw ssl option in cmsmailer panel. But Google apps still won't work on it.

First i guess my environment(php 5.2.11) problem and update to php5.3, same issue~

Then try lasted XAMPP 1.7.3 instead of WAMP, Cmsmail panel seems differernt on Encryption option. But same issure~
•Apache 2.2.14 (IPv6 enabled) + OpenSSL 0.9.8l
•MySQL 5.1.41 + PBXT engine
•PHP 5.3.1

Any idea?

Gu
Attachments
01.JPG
JeremyBASS

Re: CMSMailer & Google Apps

Post by JeremyBASS »

Hello there, two quick things.. one.. You look like you are touching the SSL: 465  which also looks like there was an issue with the upgrade?  May want to try that again but back to the point, you need to touch TLS/STARTTLS: 587 as well.. It is best to put a screen shot up of all the settings.. blur what you need username/password.. but and to the 2sd quick thing.. Please don't post here then pm people with that same post.  Hope this helps.. Cheers-Jeremy
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CMSMailer & Google Apps

Post by Dr.CSS »

@Gu

Only the last 2 versions of CMSMS are supported, if you can use 1.7.* you can use 1.9.2, please upgrade then see if it works...
cdubia

Re: CMSMailer & Google Apps

Post by cdubia »

I have the most recent version of CMS made simple and still can't for the life of me manage to get the email functionality to work.

Have followed your step by step process Jeremy; exactly what I assumed and nothing. Interestingly enough, the form attachment field did work, as the file was stored on the server folder.


Your guidance/help is much appreciated.
Post Reply

Return to “CMSMS Core”