Skip to content
English
  • There are no suggestions because the search field is empty.

SOP 104: How to Set up Mailgun Integration on GoHighLevel

Goal
To set up a functional email API service (Mailgun) in the Customer Relationship Management (CRM) portal GoHighLevel (GHL).

Ideal Outcome
By the end of this SOP, you will have a functional email API service inside the GoHighLevel portal to ensure the successful delivery of your newsletters, service/product updates, promotional emails, and other email campaigns for your clients.

Prerequisites or requirements

You need GoHighLevel and Mailgun accounts. You also need access to your domain registrar (e.g. GoDaddy, Namecheap, Digital Ocean Dreamhost, Google Domains, etc) to modify your DNS records for the email API service integration.

Why this is important
You need to maintain an efficient email receiving and delivery service — and with rules like GDPR, CAN-SPAM, and others, you will want to ensure you've conducted due diligence on each marketing contact and avoid customers and members from unsubscribing or missing your emails because of strict spam filters from email providers like Gmail. This is the reason why you need an established email API service inside the GoHighLevel CRM portal.

Where this is done
Inside the account dashboards of GoHighLevel and Mailgun. In your domain registrar, you can modify the email records inside the DNS services panel of your domain name.

When is this done
Preferably, as soon as you are ready to launch your email marketing campaigns.

Who does this
You, your VA, or your email marketing specialist.

Environment setup

Make sure you have admin access to your agency’s GoHighLevel account.
Mailgun deactivated the option to get email replies off its free version in January 2020. A few who acquired Mailgun subscriptions earlier from that date should be grandfathered in as far as receiving free emails in GoHighLevel is concerned. People who acquired accounts after December 2019 are required to switch to Mailgun's lowest-priced subscription ($0.80/1,000 emails) to gain access to the GoHighLevel emails they will receive.

Setup subdomain SMTP service in Mailgun

  1. Inside the Mailgun dashboard, go to Sending >> Domains >> Add New Domain.

2. Input the subdomain you’ll use to send emails. If you’re not sure about which subdomain to use, you can go with something like “mail.yourdomain.com” or “mg.yourdomain.com.”

3. After clicking ‘Add Domain,’ you will need to add DNS records to your domain registrar. This process can vary slightly depending on your registrar. Mailgun includes a useful list of links with custom instructions for some of the most popular domain registrars. If your registrar is not listed, you can click the step-by-step walkthrough or the video link.

4. The location of DNS records for each domain registrar will vary depending on your Domain Registrar (GoDaddy, Namecheap, Dreamhost, etc.). For the purposes of this SOP, we’ll use Dreamhost (but you should follow the instructions provided by Mailgun for your specific registrar), where we have to go to Domains >> your-domain.com and under it, click DNS.

5. Back in the Mailgun dashboard, copy the TXT, MX, and CNAME records provided by Mailgun and create those records to your DNS settings. It will also include Host Name, Priority and Value settings.

6. Enter the exact values for each ‘Type’ in your domain registrar settings from the Mailgun records.

Verify if all your domain registrar input matches all the highlighted Mailgun records in step #5:

Luckily, the Dreamhost DNS panel has its own ‘automatic error detection’ and will not let you ‘Save’ your work and prompt you, if you include extra characters or spaces, for example.

When the Dreamhost DNS panel allows you to save, then wait about 5 to 10 minutes for DNS propagation in your domain registrar. Sometimes though, it might take 24 to 48 hours, depending on your registrar.

Switch back to the Mailgun dashboard to verify if there are no errors in the values you entered in your domain registrar's domain DNS panel.

After clicking the ‘Verify DNS’ button in Mailgun, if you had no errors in inputting values in the domain registrar DNS panel, you will see the image below on your screen. It’s here where you will see errors when your registrar domain DNS is still propagating or if your registrar does not have the ‘error detection’ feature like in Dreamhost.

7. Another indicator is when you go to Sending >> Domains in Mailgun. You will see a green check beside the subdomain we used.

8. If you click that subdomain, you will get to see same 2nd screenshot in step #7. You will only use the API details in the GoHighLevel dashboard.

Configure GoHighLevel API settings

1. Inside the GoHighLevel dashboard, click Settings >> Mailgun

2. Click the @ Mailgun Logo above. You’ll see the API key input.

3. Go to the Mailgun dashboard, click on Mailgun >> Sending >> Domains, and click on the subdomain you set up. Then, click ‘Select’ in the API box. Lastly, click on any language and you will get your API key. Copy the API provided by Mailgun.

4. Copy the same API key from Mailgun and paste it in the API box in the GoHighLevel dashboard and hit Save.

Configure Mailgun Settings for Locations

You can set up different email sending domains for sub-accounts (or locations). For now, you need to enable the custom domain you just set up for existing sub-accounts.

1. Back in the GoHighLevel dashboard, click Settings >> Mailgun. You will see a switch under ‘MailGun Settings for Locations’, turn that ‘ON’ and the switch will turn green in color.

2. After clicking the pencil beside the green switch, you will again input the same Mailgun API key and choose the same subdomain below it. Then, hit Save.

Verifying that sub-accounts are using custom domain via Mailgun

  1. From the default Agency view, switch to Account view by clicking ‘Switch to Account’ and clicking at the client where you intend to use the email domain we configured via Mailgun.

2. In Account view, scroll down to Settings >> SMTP and Mailgun Service.

3. You can now configure forwarding email addresses, switch ON the ‘Forward to Assigned User’ and click Save.

Send a Test Email to Verify Successful GoHighLevel and Mailgun Integration

  1. Still using Account view, scroll to Marketing >> Emails >> Create Email.

2. Choose any template and ‘Click Send Test Email.’

3. Fill out any email address you have access to and click ‘Send Test Email.’

4. Check your inbox. Note the screenshot below that this email was sent ‘via’ the same subdomain we configured in Mailgun:

That’s it! You have successfully integrated Mailgun inside the GoHighLevel CRM portal and verified everything is functioning properly by sending a test email without any hitch. You can now kick off your email marketing campaigns like a pro!