
Prefer watching instead? Check out our video version of this tutorial!
Settings up outbound email using SMTP in CiviCRM is pretty straightforward. However, it can get a little tricky to do so when using Google Workspace as your corporate email solution, and there are a couple of pitfalls to avoid. In this tutorial, we'll show you how to do it so you don't have to waste your time.
The Steps
The process of setting this up breaks down into the following five steps:
- Allowing users to turn on 2-step verification in the Google Admin Console.
- Creating a new app password for CiviCRM in your Google Workspace account.
- Configuring CiviCRM's SMTP settings.
- Configuring CiviCRM's site email address.
- Testing your setup.
The Details
Let's dive into the details for each of the steps above.
1. Allowing users to turn on 2-step verification
In this step, we want to make sure your organization is set up to let its users turn on 2-step verification. This is a security feature that helps protect your account by requiring a second form of verification when signing in. To enable this feature, follow these steps:
- Sign in to your Google Admin console.
- In the left-hand side menu, click on "Show More" and then "Security", and then "Overview".
- Scroll down and click on "2-step verification".
- Turn on the "Allow users to turn on 2-step verification" option.
- At the bottom of the page, click "Save".
That's it for this step! Your users can now turn on 2-step verification for their accounts.
2. Creating a new app password for CiviCRM in your Google Workspace account
In this step, we want to create a new app password for CiviCRM in your Google Workspace account. This is necessary because CiviCRM needs to be able to send emails on behalf of your Google Workspace account. To create a new app password, follow these steps:
- Sign in to your Google account. If you are still on the Google Admin console, click on your profile picture in the top right corner and select "Manage your Google Account".
- In the left-hand side menu, click on "Security".
- Under "How you sign in to Google", click on "2-Step Verification". If you have not set up 2-step verification yet, you will need to do that first.
- Once you have set up 2-Step verification, click on 2-Step verification again, then scroll down and open the "App passwords" section. If you do not see this option, you can navigate to this link instead: https://myaccount.google.com/apppasswords.
- From this page, you will create a new app password. As the "App Name", write "CiviCRM". Then, click "Create".
- A new app password will be generated. Copy this password and save it somewhere safe, as you will need it later.
- Click "Done" to finish creating the app password.
That's it! You've completed step 2. Give yourself a pat on the back! You now have a new app password for CiviCRM in your Google Workspace account. This password will allow CiviCRM to send emails on behalf of your Google Workspace account.
3. Configuring CiviCRM's SMTP settings.
In this step, we will configure CiviCRM to send emails from the email address for which we just created the app password. Here's how to do that:
- Log in to your CiviCRM dashboard.
- From the top menu, navigate to Administer > System Settings > Outbound Email.
Here is what you'll need to enter in that settings page.
- Select Mailer: SMTP
- SMTP Server: ssl://smtp.gmail.com
- SMTP Port: 465
- Authentication: Yes
- SMTP Username: Your full Gmail address (example: yourname@yourorganization.com)
- SMTP Password: The app password you created in the previous step (example: htfp svhg foth fpit)
⚠️ Here's an important caveat regarding the latter: when you enter the password, make sure you type it out (including spaces) instead of copy pasting it. If you copy paste it, your configuration may not work correctly.
4. Configuring CiviCRM's site email address.
In this step, we'll tell CiviCRM to use the email address you just configured when sending outbound emails.
Here's how to do that:
- From your CiviCRM dashboard, in the top menu, navigate to Mailings > From Email Addresses
- Click on "Add From Email Address" and fill in the pop-up form which opens. That form has hints and instructions to help you and should be straightforward.
- At the bottom right of the form, click Save.
5. Testing your setup
Now for the final step, we'll test our setup to make sure everything is working as expected. To do this, navigate back to CiviCRM's SMTP settings (from the top menu, go to Administer > System Settings > Outbound Email), and click on "Save & Send Test Email" at the bottom of the page. This will send a test email to the address of the logged-in user (which is you). If you receive the test email, congratulations! Your SMTP setup is complete and working correctly. If you don't receive the email, double-check your SMTP settings and make sure everything is configured correctly.
That's it! If you need any further help with your SMTP config, shoot us an email at hello@northpnd.com, and we'll be happy to help you with it.