Digital Access Pass: Using Google Apps for the send email function

by Paul on October 4, 2011

Digital Access Pass is a highly equipped, WordPress Membership plugin.

There are stacks of WordPress membership plugins out there but I keep returning to Digital Access Pass for its versatility and simplicity.


…and there’s always a but when it comes to membership sites – Digital Access Pass isn’t perfect. But the problems can be easily overcome.

In this article, I will show you how to get past the tricky problem DAP presents when you want to use a custom SMTP service, or even your Gmail or Google Apps account.

Digital Access Pass has emailing and auto-responder functionality

The ability to use Digital Access Pass as a start-up email newsletter and mailing list service is a perk that few WordPress membership systems have.

An excellent feature associated with this unique ability is the option to setup multiple SMTP (email) service providers, so that you don’t over extend the allowances on given servers or service providers.

Great! But what about “normal” email. I.e. How about emails sent to welcome a new user to your site? Or when you resend user account details, or double opt-in confirmation emails?

These emails aren’t catered for with the “autoresponder” SMTP configuration unfortunately. Rather, DAP uses the local server’s PHP mail function.

What does this mean?

This means that if your server, for example, isn’t specified in the SPF sender list, emails sent to your shiny new clients are going to go their SPAM/Junk folders in all likelihood. At least, when I send to Gmail accounts, they do so 100% of the time.

This is no good.

If you’re certain 100% of your “Welcome” emails are lost in the SPAM folder, you’re likely going to need another solution.

My solution: reconfigure the local SMTP settings for Digital Access Pass

I paid a hefty chunk of change for Digital Access Pass, and I’m not interested in moving to another solution just yet. So I found a fix.

The fix is simply to change the setting that DAP has configured for its SMTP, and assumes the following:

  • I use Google Apps for 99% of my emailing so the instruction below will show you how to do it specifically for Gmail/Google Apps. Replace the SMTP configuration with yours.
  • I’m using the latest version of Digital Access Pass at the time of writing: v4.2.1

Here’s how you do it:

  1. FTP to your website where Digital Access Pass is installed and browse to the folder: /dap/inc/tp/ Then download to your computer the file: class.phpmailer.php.  (Make a backup copy of this file somewhere so if you find you’ve broken your DAP email altogether you can restore your original settings.
  2. Open this file up in your favourite text editor (I often use Notepad++)
  3. Go to line: 124. Change the value within quotes from ‘mail’ to ‘smtp
  4. Go to line: 178. Change the value within quotes to ‘
  5. Go to line: 184. Change the value within quotes to ‘465
  6. Go to line: 197. Change the value within quotes to ‘ssl
  7. Go to line: 203. Change the value within quotes to true (no quotes)
  8. Go to line: 209. Change the value within quotes to your Gmail/Google Apps email address or other smtp username (within quotes)
  9. Go to line: 215. Change the value within quotes to your Gmail/Google Apps or other smtp password (within quotes)
  10. Save the file, and upload this file to replace the existing class.phpmailer.php

Now test your email – for example add a new user to a product that sends out an email upon registration.

Give it a go and see how it works for you.

Notes on compatibility with future releases of DAP

If you upgrade your version of DAP you will loose your customizations.

A good idea is to create a copy of the file and store it in the same folder. This way you can overwrite it once again after the upgrade.

After contacting the authors of Digital Access Pass about the limitation of not being able to specify the SMTP server for email other than bulk and autoresponders, they informed they will be releasing this functionality in a near-future release.

If you can hold out until then, you may as well. I prefer to have my email sent using my DKIM-signed Google Apps account and also being able to see the email trail if I need to.

Let me know what you think of this guide in the comments below.

I also wrote a quick guide about how I setup the Digital Access Pass membership system for this website. It’s no longer represent this website’s membership system because I’ve changed it to individual accounts, but it’s still useful if you want to go that route.

And, if you don’t have Digital Access Pass, you can grab it here.

Use the form below to join our Developer Channel

Do you need an automated CPanel web hosting backup script? There is that and more in the Developer Channel

{ 4 comments… read them below or add one }

mike October 12, 2011 at 7:33 am

I tried this because my host has disabled phpmailer, . But still not working for me. Is there anything you have to configure inside gmail, like POP or IMAP? no idea what they are , but are they important? I also notice google say that if channel 465 is a problem use 25. Tried that too!


Paul October 12, 2011 at 10:33 am

Check with your host provider because many will block smtp connection going out of their server from “unregistered” scripts. By unregistered, I mean scripts that haven’t been vetted. Ask the host provider to ensure there’s no firewalling.

Check of course you’ve got your settings right and you’ve edited the right things.

There’s also setting you can do… search for “debug”. You could set this to true, and use the info that comes back to refer to your host.

Hope that helps.


dave July 4, 2012 at 4:16 pm


I use DAP and wonder why it does not function well when members log in using IE?

DAP tells me IE is unstable but so many people use it…WHY is it unstable and such a problem using DAP?

Does wishlist have the same problem?


Paul July 5, 2012 at 11:52 am

It’s difficult to get things working well with IE. Personally, I never use it and rarely, to be honest, care if it doesn’t work.

If you’re running Windows OS, there are a plethora of other browser options far superior to IE and by this stage, I assume the majority of people are using them. If they’re not, then in all likelihood, my site isn’t the only problem they experience.

As for Wishlist member, I couldn’t say – I’ve never tested it with IE.

Thanks for the comments and feedback… sorry it’s probably not the answer you were looking for 🙂



Leave a Comment

Previous post:

Next post: