Jump to content

How to make Google Apps for Your Domain work with WHMCS in 5 steps


Gears

Recommended Posts

I just upgraded to 4.2 and I'm having issues:

Email Sending Failed - SMTP Error: Could not authenticate.

 

 

Trying to figure it out now.

 

 

Had to go into /includes/class.phpmailer.php and change line 199

 

from

public $SMTPSecure = ' ';

 

 

to

public $SMTPSecure = 'tls';

Link to comment
Share on other sites

  • 1 month later...

Great Guide, thanks.

 

I have set this up with some minor changes to the first post, and it works perfectly on WHMCS 4.2.1, using SSL.

 

Setup Google Apps, crons etc as per first post.

 

1. Ensure PHP is compiled with OpenSSl Support.

2. Ensure firewall isnt blocking port 465

3. Edit the /includes/class.phpmailer.php and change line 199

 

from

public $SMTPSecure = ' ';

 

To

 

public $SMTPSecure = 'ssl ';

 

4. Go to Setup > General Settings > Mail

 

Mail Type - SMTP

SMTP Port - 465

SMTP Host - smtp.gmail.com

SMTP Username: enter in that 'main' email address you made. (ie. main@example.com, info@example.com)

SMTP Password: your_strong_password

 

If you get a mail loop error check your system email isnt in the support departments. Basically have a separate address.

 

Support Departments:

Host: pop.gmail.com

Port: 995

Email: aaa@yourdomain.com

Password: xxxxxx

 

From Google:

 

http://mail.google.com/support/bin/answer.py?hl=en&answer=78799

Link to comment
Share on other sites

  • 7 months later...
  • 1 month later...
  • 1 month later...

I need help. I followed the steps but the emails are not being created as tickets.

 

In the Ticket Mail Import log all my tests are there but with no "to" "from" and department not found

 

But when I got into my test client's profile I see all the test support emails i sent under Recent emails

Edited by sendas
Link to comment
Share on other sites

Just got it working with V4.4.2

 

Easy to follow tutorial.

 

Thanks.

I tried following the steps outlined here on WHMCS 4.4.2, but still am not able to get the SMTP settings right. cubemedia, any tips?

 

I mostly would like to get outgoing messages working... not going to bother with setting up support emails just yet. (I've been testing with automatically resetting a user's password...)

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Thanks for the info...I'm having a little trouble though...I get lost at step 4...can anyone please help!

Thanks!

 

Hello,

 

I figured I would share with you how to setup Google Apps to work with WHMCS Support since I figured it out myself. With this way, you can use multiple support departments despite Gmail rewriting the from address. I suggest reading the entire thing over first, then follow each step.

 

 

Step 1 - Sign up for Google Apps

 

A. Visit http://www.google.com/apps/intl/en/business/ and sign-up. For those of you in need of a free edition, use this link: http://www.google.com/apps/intl/en/business/editions.html

 

B. Verify your domain by uploading the .html file or adding the cname record

 

C. Follow the instructions for configuring Google Apps and configuring your DNS. You will need to change and add MX records, add cname records, etc. You should be able to find help at Google if you need it. Note: this will make your old setup no longer work. I am listing this in Step 1 so it gives time to propagate.

 

 

 

Step 2 - Create Email Accounts

 

A. From within your new Google Apps dashboard, create your email addresses according to your departments (ie. support@example.com, sales@example.com, etc). The passwords can all be the same if the password is strong enough. However, you may want to consider having them all be different.

 

B. Create another email account such as main@example.com, info@example.com, hello@example.com, etc. Use a strong password.

 

C. Log in to each of the new email accounts to activate them. Enable POP and IMAP while you are logged in.

 

 

 

Step 3 - Support Departments in WHMCS

 

A. From within WHMCS, create or edit your support departments. Use the following information:

 

hostname: pop.gmail.com

port: 995

user: youremail@yourdomain.com

pwd: yourpassw0rd

 

Be sure that you have Imap-SSL/Pop3-SSL enabled on your server. Check to see if your server/firewall permits the connection: telnet gmail-pop.l.google.com 995

 

B. Create the cron job: "*/5 * * * * php -q /home/username/public_html/whmcs/pipe/pop.php" Note: you may want to alter the minutes so that the emails are imported faster than 5 minutes.

 

 

 

Step 4 - SMTP in WHMCS

 

A. Refer to http://forum.whmcs.com/showthread.php?t=13845 (easiest thing to do here is download the new files from http://sws.vxcomputers.com/includes.zip). Note: backup your database and backup the two individual files you will be overwriting. Not responsible for any data loss or issues.

B. Go to Configuration > Mail

 

Mail Type - SMTP

SMTP Port - 587 (make sure this isn't blocked on your server/firewall)

SMTP Host - tls://smtp.gmail.com

SMTP Username: enter in that 'main' email address you made. (ie. main@example.com, info@example.com)

SMTP Password: your_strong_password

 

 

 

Step 5 - The Trick

 

A. This is the part I figured out that makes this possible. It is the key to making this work with multiple departments. Log into your 'main' email account (ie. main@example.com, info@example.com). Click the "Settings" link in the top right corner. Click the "Accounts" tab. In the "Send mail as:" section, click the "Add another email address you own" link. Enter in the name of the department (ie. Company Support or Company Sales) and enter in the respective email address. Click the "Next" button. Send the verification. Wait until you get a new support ticket in WHMCS. In the new ticket, find the verification code and paste it into the pop box that is open from your Google Apps accounts.

 

B. Repeat Step 4 A for as many departments as you have

 

 

 

 

Note: Step 4 will enable you to have multiple support departments and will prevent your email from being marked as spam. Some providers such as Hotmail will show your emails as "From Company <mail@example.com> on Behalf of Company Support <support@example.com>". I don't see a workaround for this and it doesn't really bother me. When they click the "Reply" button, it will reply to the respective department. The only way to totally stop this is to enable SMTP credentials at the department level rather than globally (in whmcs).

 

I don't think I missed anything, but if you need help just reply.

 

Regards,

Anthony

Link to comment
Share on other sites

  • 3 months later...

for google apps this is how it has to be setup...

 

for your smtp it has to be

 

smtp.googlemail.com

 

port 465 & enable ssl

 

no need to put anything in front of it..

 

it will work just fine and perfect.

 

pop3 settings are pop.gmail.com ssl enabled port 995

 

hope this helps you

Link to comment
Share on other sites

  • 7 months later...

Many emails coming in using the Google Apps email piping are being marked as spam and thus being moved into the Google spam folder. Google Apps seems like a nice way to have email tickets integrated but does anyone have this problem? I went back to using pop email piping with my cpanel email accounts so that all incoming emails will be picked up.

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...

I have a persisting problem.

 

I followed the first post and the latest steps taken to enable the Email Piping.

 

Server provider tells me that the cron job is setup and running. I have setup the SMTP for the mail and the POP for the department. But still no Support Ticket Email Log is created.

 

I have tried several steps suggested for a week with no luck.

Link to comment
Share on other sites

Seems to be broken with WHMCS version 5.1.2. I upgraded from version 4 where our Google Apps was configured in the SMTP and now we have clients saying that our emails are being marked as spam. I followed all six pages here along with an hour of creativity in changing things up, but still no luck. Just when things are working right, it breaks. Seems pretty coincidental if this is a Google thing when I just upgraded WHMCS.

 

Regardless of whatever happened.. we can't have emails being marked as spam. Need to figure a workaround.

Edited by Erik
Link to comment
Share on other sites

I just tested this simple PHP code and it worked..

 

<?php

      require_once "Mail.php";

       $from = "<google apps email address>";
       $to = "<to email address>";
       $subject = "Hi!";
       $body = "Hi,\n\nHow are you?";

       $host = "ssl://smtp.gmail.com";
       $port = "465";
       $username = "<google apps email address>";
       $password = "<google apps password>";

       $headers = array ('From' => $from,
         'To' => $to,
         'Subject' => $subject);
       $smtp = Mail::factory('smtp',
         array ('host' => $host,
           'port' => $port,
           'auth' => true,
           'username' => $username,
           'password' => $password));

       $mail = $smtp->send($to, $headers, $body);

       if (PEAR::isError($mail)) {
         echo("<p>" . $mail->getMessage() . "</p>");
        } else {
         echo("<p>Message successfully sent!</p>");
        }

   ?>  <!-- end of php tag-->

 

Now to figure out how to implement this..

Link to comment
Share on other sites

  • 2 weeks later...

Hello Gears,

 

I am trying to use Mandrillapp.com for SMTP. It's really good, everything to "Inbox".

 

But...

 

My damn WHMCS is not working fine I think. Before buying License I was using a Nulled version por something like 20 days and Now that I bought it and I am using the latest version it's not working.

 

SMTP Port: 25, 465 (ssl), 587 (tls)

SMTP Host: smtp.mandrillapp.com

SMTP User: MyUser

SMTP Pass: MyPass

 

Result: Email Sending Failed - SMTP Error: Could not authenticate.

 

This is the same for Google Apps and also for local SMTP (mail.mydomain.com).

 

I've tried everything on this thread but with no success. Could you tell me what to do?

 

Regards,

Link to comment
Share on other sites

  • 1 month later...
Hello Gears,

 

I am trying to use Mandrillapp.com for SMTP. It's really good, everything to "Inbox".

 

But...

 

My damn WHMCS is not working fine I think. Before buying License I was using a Nulled version por something like 20 days and Now that I bought it and I am using the latest version it's not working.

 

SMTP Port: 25, 465 (ssl), 587 (tls)

SMTP Host: smtp.mandrillapp.com

SMTP User: MyUser

SMTP Pass: MyPass

 

Result: Email Sending Failed - SMTP Error: Could not authenticate.

 

This is the same for Google Apps and also for local SMTP (mail.mydomain.com).

 

I've tried everything on this thread but with no success. Could you tell me what to do?

 

Regards,

 

For GoogleApps use:

 

SMTP Port: 587 (TLS)

SMTP Host: smtp.gmail.com

SMTP User: Username (mail@domain.com)

SMTP Pass: Password (your GA pass)

 

I have GoogleApps setup and everything works perfect! - I only pay for one GoogleApps user account ($5/mo), but manage multiple email addresses (billing@, support@, ect..) all within one GA user account.

 

To learn how to accomplish this, refer to: http://www.hostingdiscussion.com/148963-post10.html

Link to comment
Share on other sites

  • 2 weeks later...

ok so the key element here OUTSOURCING YOUR SUPPORT.

 

Well you can still allow your support to be outsourced and still have complete control over the whole system from end to end and not need googles favours for it, its really very very very very very simple.. did i miss a very.

 

 

Create your departments each with its own email address, create your email piping. CREATE YOUR SUPPORT ADMIN (outsourced) ACCOUNTS. give them a department or 5 and jobs done.

 

They receive emails from your system, you receive emails from your system, your clients receive emails from your system, i really couldnt be any simpler. well that is unless whmcs find a way to have the system provide support to our clients all by its lonesome but i dont hold much hope for that lol.

 

Hell, seeing as your outsourcing your support. you can always just use pandorabots, they work by email too i think so you can tell it what to say and what to do and bobs ur anties daughter

Link to comment
Share on other sites

  • 1 month later...

The way I did it was create users in google apps for the deparments

 

sales@domain.com and support@domain.com

 

Then Create a 2 groups Sales and Support group.. Then give the group email accounts of sales-@domain.com and support-@domain.com

 

had to add the dash as the emails of support and sales were used as users.

 

Now add the people that will be handling tickets to the groups. So any emails sent that group, you will get

 

next login to the user accounts of sales and support and foward all emails to the sales and support group which will then land in the inboxes of the user handling the tickets

 

Next login to whmcs and and add the email credentials of the sales@domain.com and support@domain.com and the pop settigns and everything should work..

 

 

You just have to burn up 2 of your user accounts with the 10 free in google with your support and sales email.. You cant just use the group emails because they dont have passwords to put into whmcs to communicate

Link to comment
Share on other sites

  • 3 months later...

Hi Gears

I have been trying to sort this for a while now and getting nowhere as I can send via WHMCS but not receive, its got me stumped, I would appreciate and help you can give, thanks

 

I have to add that I am amazed that WHMCS does not work out of the box with Google Apps. Am I missing something or is not Google the biggest player in the world at the moment (and have been for some time) and yet no thought has gone into email piping with Google Apps and we have to do these work arounds ... go figure.

Edited by frankwarwick
Link to comment
Share on other sites

  • 5 weeks later...
Hi Gears

I have been trying to sort this for a while now and getting nowhere as I can send via WHMCS but not receive, its got me stumped, I would appreciate and help you can give, thanks

 

I have to add that I am amazed that WHMCS does not work out of the box with Google Apps. Am I missing something or is not Google the biggest player in the world at the moment (and have been for some time) and yet no thought has gone into email piping with Google Apps and we have to do these work arounds ... go figure.

 

Are you sure you configured WHMCS to use GA SMTP servers correctly? Please see post: http://forum.whmcs.com/showthread.php?17963-How-to-make-Google-Apps-for-Your-Domain-work-with-WHMCS-in-5-steps&p=269890#post269890

 

Also, when you setup a support department via the Setup options, make sure you enable POP and enter the correct details if you want to enable replies via email. The GA POP settings are:

 

Hostname: pop.gmail.com

POP3 Port: 995

Email Address: your GA email

Email Pass: your GA email password

 

You must also enable POP from within your GA account settings as well.

Link to comment
Share on other sites

  • 11 months later...
We wanted realtime ticket imports. We forward our Google Apps email to a subdomain in cpanel that pipes the email to WHMCS.

 

I'm about to switch over to Google Apps to use this kind of setup, mainly for resilience - of course our server never goes down :roll: but if it should we will not lose support emails... :idea:

 

Don't want to use cron and have to wait 5mins for imports.

 

So, would someone be kind enough to explain the additional method mentioned here: forwarding emails to a subdomain on your server in order to use the pipe script?

 

So if you have multiple emails set up in apps, e.g. support, sales, info etc - should they all forward to a single email address on the sub-domain or what? A detailed explanation would go a long way - thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated