# Create an SMS to Email trunk

Create an SMS to Email trunk to forward incoming SMS messages from your DID
numbers to an email address. Set the recipient email address and the subject
and body of the forwarded email, and optionally add the trunk to an SMS trunk
group.

For how DIDWW delivers SMS by email, see [SMS to Email trunk](../sms-to-email-trunk.html).

## Before you begin

- An active DIDWW account is required. [Sign in to DIDWW](https://my.didww.com/users/sign_in) or [Create DIDWW account](https://my.didww.com/users/sign_up#/users/sign_up).

## Step 1: Open the creation form

1. In the DIDWW User Panel, go to **SMS > SMS Trunks**.
2. Click **Create New** in the top-right corner.
3. Select **Email** from the dropdown menu.

[![Create New menu on the SMS Trunks page with Email highlighted](../../../../_images/fig167.png)](../../../../_images/fig167.png)


**Fig. 1.** Select Email

## Step 2: Configure the General settings

In the **General** section, enter the information required to set up the
trunk.

1. In **Friendly name**, enter a unique, descriptive name to identify the
   trunk.
2. In **Recipient email**, enter the email address where incoming SMS
   messages will be delivered. The field accepts one email address.
3. Optionally, change the **Email subject** and **Email body** templates of
   the forwarded email. Both fields contain default templates and cannot be
   empty.

[![Create SMS to Email Trunk form with the General settings, the list of available variables, and the Trunk Group Configuration section](../../../../_images/fig255.png)](../../../../_images/fig255.png)


**Fig. 2.** Configure the SMS to Email trunk

You can use variables in the **Email subject** and **Email body** fields, for
example `{SMS_SRC_ADDR}` for the sender address. The form lists the
available variables next to these fields. Field definitions, defaults, and
variable descriptions are listed in [General
settings](../sms-to-email-trunk-settings-reference.html#sms-to-email-trunk-settings-general).

## Step 3: Add the trunk to a trunk group (optional)

You may assign the trunk to an existing SMS trunk group in order to enable
failover. Within the trunk group, the trunk's priority determines the order in
which trunks will be used. If the trunk will not be part of a trunk group,
skip to Step 4.

1. Expand the **Trunk Group Configuration** section and select the group in
   **Assign to trunk group**.
2. In **Priority**, enter the trunk's priority within the group, from `0`
   to `32767`.

[![Trunk Group Configuration section of the Create SMS to Email Trunk form with the Assign to trunk group and Priority fields](../../../../_images/trunk_group3.webp)](../../../../_images/trunk_group3.webp)


**Fig. 3.** Configure the trunk group settings

Note

The system attempts to contact the target SMS trunk with the
highest-numbered priority first.

Field definitions are listed in [Trunk group
settings](../sms-to-email-trunk-settings-reference.html#sms-to-email-trunk-settings-trunk-group). To create a group, see
[Create an SMS trunk group](../../trunk-groups/how-to-guides/create-sms-trunk-group.html).

## Step 4: Create the trunk

Click **Create** at the bottom of the page to save the new trunk.

[![Create button highlighted on the Create SMS to Email Trunk form](../../../../_images/create4.webp)](../../../../_images/create4.webp)


**Fig. 4.** Create the trunk

The new trunk appears in the **SMS Trunks** list. Creating the trunk does not
assign it to a DID number.

## Next steps

- [Assign the trunk or its SMS trunk group to one or more DID numbers](../../../../phone-numbers/my-numbers/how-to-guides/assign-sms-trunk.html#assigning-sms-trunk) that support inbound SMS. The trunk receives messages
  only after it is assigned.
- Send a test SMS to an assigned DID number and check that the email arrives.
  If it does not, review [Inbound SMS logs](../../../../logs-analytics/sms-logs/inbound-logs.html#inbound-logs) and
  [SMS to Email delivery](../../technical-data/guidelines.html#sms-in-guidelines-email).

## Related resources

- [SMS to Email trunk settings reference](../sms-to-email-trunk-settings-reference.html) - Look up field definitions,
  variables, and trunk group settings.
- [SMS to Email trunk](../sms-to-email-trunk.html) - Understand how DIDWW
  forwards incoming SMS to email.
- [Assign an SMS trunk](../../../../phone-numbers/my-numbers/how-to-guides/assign-sms-trunk.html#assigning-sms-trunk) - Assign the trunk to one
  or more DID numbers.
- [Manage SMS to Email trunks](manage-sms-to-email-trunk.html) - Edit or
  delete an existing SMS to Email trunk.
- [SMS trunk groups](../../trunk-groups/sms-trunk-groups.html) - Group SMS
  trunks for failover.
