close
GENERIC-email-340×200

Email Integration Allows Channels to Receive Email

By default, any channel in a team can receive email from any sender. Teams supports this capability by assigning email addresses to channels on an on-demand basis and using inbound email sent to create new conversations in the target channels. It all sounds good and works smoothly, and it’s there because many interesting ideas and suggestions surface in email first. Those involved in the discussion then have the choice to continue in email or take the debate to a suitable Teams channel where others can join the conversation, and everyone sees what’s going on.

Organization-level Control

If you’d prefer to impose some control over email communications to Teams, head for the Org-wide settings section of the Teams admin center and select Teams settings. The Email integration section (Figure 1) allows tenants to:

  • Disable or enable the ability of users to send email to channel email addresses. The default is On.
  • Create an accepted list of domains from where email can originate. The default is to accept email from any domain.
Email integration settings in the Teams admin center
Figure 1: Email integration settings in the Teams admin center

If your organization uses several domains, make sure to include all the domains used to send email in the list of accepted domains. Individual team owners cannot override the set of accepted domains defined for a tenant.

Updating with PowerShell

You can also update the settings with PowerShell by running the Set-CsTeamsClientConfiguration cmdlet from the Teams module. In this example, we update the settings to allow channels to receive email from a restricted list of three domains:

Note the use of semi-colons to separate the domain names rather than the commas specified in Microsoft’s documentation. In addition, do not leave spaces between the domain names. It can take an hour or so before the addition or removal of a domain from the list becomes effective.

Generating Email Address for Teams Channels

A channel email address is composed of an eight-character identifier, the name of the default email address policy (if the tenant has a special address policy for groups, the domain specified in that policy is used), and the Teams messaging domain which handles delivery to the channel. An example is:

1e2d0ee3.office365itpros.com@emea.teams.ms

In this instance, the emea.teams.ms domain tells us that the tenant is in the EMEA (Western Europe) datacenter region. Other values include na.teams.ms (North America) and apac.teams.ms (Asia Pacific).

You cannot change the name or format used for the identifier. Teams generates the value automatically the first time a team member from the tenant requests an email address for a channel, and one is not already present. Guest members can retrieve a channel email address if one exists, but they can’t generate a new address. Team members (except guests) can also remove the email address for a channel. If someone does, Teams generates a new address for the channel the next time a team member requests one.

The new channel email address will not be the same as the original, meaning that anything depending on that email address will cease to work and email senders will receive non-delivery notifications saying:

Delivery has failed to these recipients or groups:

ce49a0c3.office365itpros.com@emea.teams.ms
This channel was not found, so we couldn’t send your message. If you have any questions, contact the team owner.

Teams captures audit records when team members generate or remove channel email addresses. Here’s an example of how to interrogate the audit log to find the relevant records. You can’t generate a report of Teams channels with email addresses using pure PowerShell, but you can with a combination of PowerShell and Graph API calls.

Routing Email to Channels

Email delivery to a Teams channel is more complicated than to a mailbox. Channel email addresses do not point to normal Exchange Online mailboxes. Microsoft manages these mailboxes, which are inaccessible to customers. Like other email addresses, the domains are resolvable in DNS. We can see from this output that messages sent to emea.team.ms go to protection.outlook.com, just like any other Exchange Online domain. In other words, the first step in their transfer is to have Exchange Online Protection process the messages.

The special target mailboxes act as a reception point for email sent to Teams. Connectors pick up the email delivered to the mailboxes and create new conversations in the target channel (Figure 2). In this example, the sender set the message importance to be High, so Teams flags the conversation as Important.

Reading an email as a conversation in a Teams channel
Figure 2: Reading an email as a conversation in a Teams channel

Note the way Teams uses the message subject as the conversation subject. If people forward messages to Teams channels, it’s a good idea to review the message subject before sending to make sure that the conversation has an appropriate and meaningful subject in the channel.

If you want the message to arrive in multiple channels, you must include the address for all the target channels in the message.

Teams imposes some rules on the kind of messages it will accept. In most cases, these restrictions won’t get in the way of users:

  • Messages can’t have more than 50 inline images or more than 20 file attachments.
  • No attachment can be larger than 10 MB.

Capturing Copies of Email in SharePoint Online

When Teams creates a new conversation, it also stores the copy of the original message in a subfolder of the channel folder in the SharePoint Online site belonging to the team (Figure 3). Up to February 2021, Teams used the EmailMessages subfolder. Now, Teams creates a separate subfolder monthly, which is why you see the messages in the EmailMessages_8_2021 (August 2021) folder.

Copies of email messages sent to a channel stored in SharePoint Online
Figure 3: Copies of email messages sent to a channel stored in SharePoint Online

If you want to access the original message, use the View original email option to download a copy of the .eml file. The .eml file is a faithful copy of the original, complete with headers showing the transfer of the message from the sending server to delivery for Teams.

Getting and Using Channel Email Addresses

To retrieve the address of a channel, use the Get email address option in the channel menu and then use the Copy button (Figure 4) to copy the email address to the clipboard. The user can then paste the address into email headers as needed. Note the dangerous option to remove the email address from the channel as discussed above.

How to Control Sending Email to Teams Channels
Figure 4: Retrieving the email address for a channel

Figure 5 shows the advanced settings view, which includes the email address (and a display name composed from the channel name and the team name). We can also see any limitations set on email delivery. A team owner can choose to limit acceptance to email sent by team members. Otherwise, Teams will accept email from any email address and deliver it to the channel (even to private channels) if the sender complies with the restricted domain list configured for the tenant.

Advanced settings for a channel email address
Figure 5: Advanced settings for a channel email address

If delivery is restricted to a channel and the sender is not a team member or from an accepted domain, they receive a message from Teams with the following:

Delivery has failed to these recipients or groups:

1e2d0eb3.office365itpros.com@emea.teams.ms
The administrator has restricted permissions to send emails to this channel.

Using Channel Email Addresses in Distribution Lists and Groups

Obviously, people can use the channel email address to address a message on an ad-hoc basis. For more persistent use, you can create a mail contact for the channel address. This approach has the advantages of making the address readily available to all users through the GAL and allowing the channel to be a member of a distribution list. Microsoft’s support documentation for sending email to a channel calls out using a channel address as part of a distribution list. I have never had an issue when using a channel email address for a mail contact and adding the mail contact to distribution lists.

If you want to have the channel in a Microsoft 365 group, you can use the channel address to create a guest account in Azure AD and include the guest account in the group membership. I use this technique to capture copies of all messages sent to a Microsoft 365 group in a team channel.

Keeping Ideas Flowing

The Email Integration capability in Teams allow users to send messages to channels to create new conversation threads as easily as sending email to any other recipient. It’s a nice feature to have and something that people who split their work communications between email and Teams will find useful, once they know how to use the technology. Isn’t that always the way?

Source Practical365

Chioma Ugochukwu

The author Chioma Ugochukwu

Leave a Response