---
title: "Connecting Mailgun as SMTP with ClickFunnels"
slug: "connecting-mailgun-as-smtp-with-clickfunnels-1"
description: "Mailgun can be used as an SMTP provider in ClickFunnels to send emails from your own domain. This article covers verifying your domain, retrieving SMTP credentials, connecting Mailgun to ClickFunnels, and adding the necessary webhook URL for email delivery."
tags: ["email settings", "Mailgun", "smtp"]
updated: 2025-06-23T15:35:52Z
published: 2025-06-23T15:35:52Z
canonical: "support.myclickfunnels.com/connecting-mailgun-as-smtp-with-clickfunnels-1"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.myclickfunnels.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting Mailgun as SMTP with ClickFunnels

Mailgun is a powerful email delivery service that allows you to send marketing emails via its SMTP service. By integrating Mailgun with ClickFunnels, you can use Mailgun’s infrastructure to ensure reliable email sending from within your ClickFunnels workspace. This article will guide you through connecting Mailgun as your SMTP provider for email delivery.

![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/M0dF5hxVm3bKc9yAylHWC9U8s8d66SSz2A.png)

---

## Requirements

- An active ClickFunnels account
- A [domain](/v1/docs/domains-how-to-connect-an-existing-domain-automated-setup) connected to the workspace
- [Access to Email Settings](/v1/docs/how-to-add-team-members-or-subusers-for-collaboration) (available only to users with the Funnel Builder, Marketing, or Administrator roles)
- The [email DNS records](/v1/docs/email-settings-how-to-verify-email-dns-records) verified in the domain
- A [Mailgun](https://www.mailgun.com/) account

---

## Step 1: Verify the Domain in Mailgun

Before you can use Mailgun as your SMTP provider in ClickFunnels, you must verify the domain or subdomain from which you wish to send emails.

1. **Log in** to your Mailgun account and navigate to the left-hand menu.
2. From the navigation, click on **Send » Sending** menu, and then select the **Domains** sub-menu.
3. Click the **Add New Domain** button in the top right corner of the page.

![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/p7iDqaisRyNQfRi50SzkEOcxL8GMg_G7iw.png)
4. Enter your domain name (this can be either a root domain or a subdomain). For instance, you could enter **mail.yourdomain.com**.
  - Select the appropriate **Domain Region** based on your domain location (US or EU).
  - Leave the **IP assignment option** as **Shared IP** unless you have a dedicated IP.
  - Under **Advanced Settings**, choose whether to manage your own DKIM keys or use automatic sender security. In our setup, we selected **Self-manage DKIM keys** for more control.
  - Once you’ve configured the settings, click **Add Domain**.

![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/KC2auM8bemS7dvEDYvbqXgKo22FTUlEZLg.png)
5. After adding your domain, you will be provided a set of **DNS records (TXT, MX, and CNAME)** that you will need to add to your domain’s DNS provider. Copy each DNS record provided by Mailgun and enter them into the appropriate fields with your DNS provider (e.g., GoDaddy, Cloudflare). Once the records have been added, return to Mailgun and click **Verify** to confirm your domain setup. ![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/BwziHnaE-R-aseN_0ESIMjXawTG4YAZa5Q.png)

> [!WARNING]
> **Important:**
> 
> - When adding DNS records, some DNS providers may not require you to input the full host(name) value provided by Mailgun. For example, instead of adding `smtp._domainkey.mail.cfeducations.com`, you may only need to add `smtp._domainkey.mail`. DNS behavior varies by provider, so if you encounter any issues, it’s best to consult your DNS provider or contact Mailgun support.
> - Additionally, if you are using **Cloudflare** as your DNS provider, make sure to turn off the **Proxy** option when adding the records. This will help avoid any verification issues.

---

## Step 2: Retrieve Mailgun SMTP Credentials

To use Mailgun as an SMTP provider in ClickFunnels, you must retrieve your SMTP credentials, including a username and password. Follow the steps below to get these credentials:

![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/20kjJmGCOIdCSOrdVEmJBR5MwpQTnWLz6w.png)

1. In your Mailgun account, navigate to the **Domain Settings**.
2. Click on the **SMTP credentials** tab to access your SMTP credentials.
3. You will see your **Username** displayed under **Login**.
4. For security reasons, Mailgun does not display the SMTP password directly. To retrieve or reset your password, click on the **Reset password** button. A pop-up will appear, allowing you to reset the password. You can either let Mailgun generate a password automatically (recommended) or create one manually.
5. After resetting the password, a notification will appear at the bottom-right corner of the screen. The password will be available to **copy** from this notification.
6. Once you have your username and password, keep them handy, as you will need to enter these credentials into ClickFunnels for the SMTP configuration.

---

## Step 3: Add Mailgun as SMTP in ClickFunnels

Once you have verified your domain and retrieved your Mailgun SMTP credentials, the next step is to integrate Mailgun with your ClickFunnels workspace by adding it as an SMTP provider.

1. In your ClickFunnels account, go to **Workspace Settings** and select **Email Settings**.
2. Click on the **SMTP Settings** tab.

![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/image-0OMML0EZ.png)
3. Click the **Add SMTP Setting** button to start the configuration.
4. In the new SMTP settings window, fill in the following fields:

![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/LO_EnzLqfIMZ-2oGp6gfrw0Kj3xax2avsQ.png)
  - **Nickname**: Enter a name for this SMTP configuration (e.g., “Mailgun”).
  - **Email Domain**: Select the domain you verified in your ClickFunnels workspace.
  - **Server**: Choose **Mailgun** from the list.
  - **Port**: Enter `587`, which is the standard port for Mailgun’s SMTP server.
  - **Username**: Enter the SMTP username provided by Mailgun.
  - **Password**: Enter the SMTP password you retrieved from Mailgun.
5. **Add Webhook for Event Tracking**: Copy the **Webhook URL** provided by ClickFunnels. You must paste this URL into your Mailgun account in the **Send » Sending » Webhooks** menu to enable event tracking.

![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/fnQ8-Nb1nVjcsm8W9VtS0QUmEN439Bz8vw(1).png)

Refer to [Step 4: Add ClickFunnels Webhook URL in Mailgun](/docs/connecting-mailgun-as-smtp-with-clickfunnels-1#step-4-add-clickfunnels-webhook-url-in-mailgun) for detailed instructions on setting up the webhook in Mailgun.
6. After completing the above steps, click **Update SMTP Setting** in ClickFunnels. ClickFunnels will verify the connection with Mailgun, and your SMTP status will be updated with a green checkmark.

---

## Step 4: Add the ClickFunnels Webhook URL in Mailgun

Mailgun allows you to add a Webhook URL for each event type. This means that if you want to track events such as opens, clicks, and unsubscribes, you will need to add the webhook URL multiple times, once for each event type. Follow these steps to add your webhook URL:

1. In your Mailgun account, navigate to the **Send » Sending** menu and select **Webhooks** from the options.
2. Click the **Add Webhook** button on the right-hand side.

![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/ahARFQNmkNODUqkdjRQpdWzn1wwrGW84Rg.png)
3. In the **New Webhook** window, select the **Event Type** (e.g., Delivered Messages, Opens, Clicked).
4. Paste the **Webhook URL** provided by ClickFunnels in the **URL** field.
5. Click **Create Webhook** to save the webhook.

![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/VFx_voFXfKM8qMc1bwi7Z5TtpV9w4w3lQA.png)
6. Repeat the process for each event type you want to track, such as **Opens**, **Clicks**, **Unsubscribed**, **Delivered,** etc.

![](https://cdn.document360.io/e3762771-4bea-47c2-a830-5473d543417a/Images/Documentation/vE6DWLWSF7KQr21UKbCUtYUId-uDhHCVWQ.png)

---

## How ClickFunnels Utilizes Mailgun SMTP for Email Sending

Once your Mailgun SMTP is successfully connected to your ClickFunnels workspace, the system will display the verified status for your associated email domain.

Any email address created within your workspace, linked to this domain, will automatically use the Mailgun SMTP for email delivery when sending broadcasts or emails within workflows. ClickFunnels dynamically makes this decision based on the connected SMTP and the selected email address.

**Example:**

For instance, you have verified the domain `www.yourdomain.com` in your ClickFunnels workspace, and set up an email address like `support@yourdomain.com`. After verifying the domain and DNS records both in ClickFunnels and Mailgun, when you’re ready to send a broadcast or trigger an email step in a workflow, you will **choose the email address** you wish to send from. If you select `support@yourdomain.com`, ClickFunnels will automatically route the email through Mailgun’s SMTP, as the email address is associated with the verified domain connected to Mailgun. If Mailgun were not connected, ClickFunnels would use the default internal mail server.

**Important:**

When your email domain is associated with an SMTP server, the **system emails** will not use the custom email address set as “From Email” in the workspace settings under Email Settings. System emails can only utilize a custom email address as “From Email” when the email domain is **not linked** to an SMTP server. If you don't have one, ClickFunnels will use the default system email address (e.g., *no-reply+XXXX@clickfunnelsmail.com*) to send system emails. An SMTP can only be used to send marketing emails in the workspace.

**Important:**To receive replies to emails sent from a custom address in ClickFunnels, an **email inbox** must be set up. An email inbox stores incoming messages and is not included by default with most custom domains. You can create an email inbox using external providers like **Google Workspace**, **Zoho Mail**, **Proton Mail**, or any other service that supports custom domain email hosting. These services allow you to send and receive emails directly from your custom email address.

## Related

- [Connecting an SMTP with ClickFunnels](/connecting-an-smtp-with-clickfunnels.md)
- [Connecting SendGrid as SMTP with ClickFunnels](/connecting-sendgrid-as-smtp-with-clickfunnels.md)
- [Adding a Custom Email Address in ClickFunnels](/adding-a-custom-email-address-in-clickfunnels.md)
- [Email Domains: Verifying Email DNS Records](/email-domain-verifying-email-dns-records.md)
- [How to Customize and Manage System Emails in ClickFunnels](/how-to-customize-and-manage-system-emails-in-clickfunnels.md)
