### [Setting Up Smart Email Routing](https://wpmailsmtp.com/docs/setting-up-smart-email-routing/)

**Published:** November 23, 2023
**Author:** David Ozokoye

**Excerpt:** Learn how to coditionally use different email providers for different types of emails in WordPress.

**Content:**

Smart Routing is a Pro Feature

 Unlock Smart Routing and other powerful features to grow your business.

 [ Get WP Mail SMTP Pro ](https://wpmailsmtp.com/pricing/)

Would you like to set up your WordPress site to conditionally send emails using different connections? WP Mail SMTP’s Smart Routing feature allows you to configure which mailer connection to use depending on the conditions you set.

This tutorial will show you how to set up Smart Routing in WP Mail SMTP.

---

Before getting started, you’ll first need to ensure WP Mail SMTP is [installed and activated](https://wpmailsmtp.com/docs/how-to-install-the-wp-mail-smtp-plugin/) on your WordPress site and that you’ve [verified your license](https://wpmailsmtp.com/docs/how-to-verify-your-wp-mail-smtp-license/).

### Enabling Smart Routing

**Note:** Before setting up Smart Routing, you’ll need to have at least one [additional connection](https://wpmailsmtp.com/docs/configuring-additional-connections/) configured in WP Mail SMTP.

After you’ve added an additional connection, go to **WP Mail SMTP » Settings**. Then click on the **Smart Routing** tab.

![smart routing tab](https://wpmailsmtp.com/wp-content/uploads/2022/12/wp-mail-smtp-smart-routing-tab.png)

To use this feature, you’ll need to toggle on the **Enable Smart Routing** option.

![enable smart routing](https://wpmailsmtp.com/wp-content/uploads/2022/12/enable-smart-routing.png)

After you’ve enabled this option, proceed to configure your settings.

### Configuring Smart Routing Settings

In the **Select a Connection** dropdown, choose an additional connection that’ll be used if the conditions you set are met.

![select a connection](https://wpmailsmtp.com/wp-content/uploads/2022/12/select-a-connection.png)

Below the connection, you’ll find the conditions section.

![conditions section](https://wpmailsmtp.com/wp-content/uploads/2022/12/conditions-section.png)

Here is a brief overview of the available options:

- **Condition type:** This field contains the options you’d like to base the condition on.
- **Operator:** This field contains various comparison operators for configuring the condition.
- **Value:** In this field, you’ll need to enter the text or keyword to compare with the condition type.

In the condition type dropdown, you’ll find options for setting up the condition.

![condition type field](https://wpmailsmtp.com/wp-content/uploads/2022/12/condition-type-field.png)

Below we’ve outlined the available options:

- Subject
- Message
- From Email
- From Name
- To
- CC
- BCC
- Reply-To
- Header Name
- Header Value
- Initiator

Next, in the comparison operator dropdown, choose how you’d like to condition the option you selected.

![comparison operator](https://wpmailsmtp.com/wp-content/uploads/2022/12/comparison-operator.png)

Below we’ve outlined the available options:

- Contains
- Does not contain
- Is
- Is not
- Starts with
- Ends with

In the value field, enter the text you’d like to use as the condition for sending emails with this connection.

![smart routing value field](https://wpmailsmtp.com/wp-content/uploads/2022/12/value-field.png)

**Note:** If you choose the **Initiator** condition type, you’ll only have access to the **Is** and **Is not** comparison operators. Also, the value field will include a dropdown with a list of services that can send emails from your website.

As an example, we’ll use the **SendLayer** mailer if the Subject contains the term “Inquiry.”

![example smart routing condition](https://wpmailsmtp.com/wp-content/uploads/2022/12/example-smart-routing-condition.png)

After adding the condition, click on **Save Settings** to update your changes.

![save settings](https://wpmailsmtp.com/wp-content/uploads/2022/12/save-settings.png)

#### Adding Multiple Conditions

With the AND / OR rules, you can add multiple conditions when configuring Smart Routing.

##### AND

To use this option, click on the **And** button.

![adding and condition](https://wpmailsmtp.com/wp-content/uploads/2022/12/and-condition.png)

A new condition will be added below the initial rule.

![new and block](https://wpmailsmtp.com/wp-content/uploads/2022/12/new-and-block.png)

Go ahead and configure the conditions with the options you’d like to check.

With the AND rule set up, the Smart Routing condition will only be true if all of the individual conditions are met.

##### OR

To use this option, click on **Add New Group** below the **or** section. A new condition will be added to the Smart Routing block.

![add new group](https://wpmailsmtp.com/wp-content/uploads/2022/12/add-new-group.png)

Next, enter the details of the condition you want to check.

![configuring or rule](https://wpmailsmtp.com/wp-content/uploads/2022/12/configuring-or-rule.png)

In our example, we’ve set the condition to use the **SendLayer** mailer if the Subject contains the term “Inquiry” or the **Initiator** of the email is **WP Core**.

After adding an OR rule, the Smart Routing condition will be true if one of the individual conditions are met.

Once you’re satisfied with the conditions, go ahead and click the **Save Settings** button.

![save settings](https://wpmailsmtp.com/wp-content/uploads/2022/12/save-settings.png)

Now when emails are sent from your WordPress site, WP Mail SMTP will use the connection you selected if the conditions are met.

**Note:** If none of the conditions are met, your WordPress site will send emails using the Primary Connection.

### Adding a New Smart Routing Block

You can set multiple Smart Routing conditions for each additional connection you configure on your website. This can be useful if you’d like to use different connections for every plugin that can send emails on your website.

To create a new condition, click on **Add New**.

![add new smart routing condition](https://wpmailsmtp.com/wp-content/uploads/2022/12/add-new-smart-routing-condition.png)

It will add a new Smart Routing block below the default block.

![new smart routing block](https://wpmailsmtp.com/wp-content/uploads/2022/12/multiple-smart-routing-block.png)

The process of configuring the additional condition is the same as we’ve [seen above](#configure-smart-routing). Be sure to save your settings after configuring an additional Smart Routing block .

### Deleting a Smart Routing Condition

If you’d like, you can delete one of the Smart Routing conditions you’ve set up. To delete a Smart Routing block, click on the **trash** icon.

![delete smart routing block](https://wpmailsmtp.com/wp-content/uploads/2022/12/delete-smart-routing-block.png)

If you’ve set up multiple conditions using the AND / OR rules, you can delete any of them by clicking on the **trash** icon next to each condition.

![delete and or condition](https://wpmailsmtp.com/wp-content/uploads/2022/12/delete-and-or-condition.png)

That’s it! You now know how to set up Smart Routing to conditionally send emails using different connections.

Next, would you like to have control over which emails WordPress core sends out? Be sure to check our guide on [using email controls](https://wpmailsmtp.com/docs/how-to-manage-email-controls/) to learn more.

**Categories:** Functionality

---

