Skip to main content
All CollectionsAPIGeneral
Channels for SMTP and API
Channels for SMTP and API

Learn how to pass and find channel information in Elastic Email

Support Team avatar
Written by Support Team
Updated over 3 years ago

Note: Maximum allowed length of a channel name is 191 characters

When sending emails with SMTP or API, Elastic Email organizes your email flow by channels instead of dividing them into separate campaigns with each new job. Specifying (or creating) channels is a little different for both of these sending methods.
โ€‹

Channels for SMTP

If you want to specify a channel to send through when using SMTP connection, you will have to set up a custom header when composing your email job that should look like:

Channel: YourChannelNameHere

OR

X-ElasticEmail-Channel: YourChannelNameHere

This will either send your emails through channel "YourChannelNameHere" or first create it and then send through it if the channel with this name doesn't exist already.

Please remember that for custom headers to work, you will have to have the "Custom headers" option turned on. You can check this option on the Account>Settings>Sending>Advanced screen:

Channels for API:

In order to pass information about channel name in an API call, a particular parameter has to be specified - Channel. It can be found as one of the parameters listed for our basic email/send API Call:
โ€‹https://api.elasticemail.com/public/help#Email_Send

An simple email/send API Call with a channel specified:

API Key and email addresses should be changed to real values

As with SMTP, when a successful API call with a channel name included is made, it will be placed in a relevant channel or create it first if necessary.

After sending a successful email with SMTP or API with a channel parameter or header, you can search for the channels you have created in the Activity>Channels screen:

Did this answer your question?