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:

[string]$SenderDomains = "Office365itpros.com;contoso.com;microsoft.com;yandex.com "
Set-CsTeamsClientConfiguration -RestrictedSenderList $SenderDomains -AllowEmailIntoChannel $true
Get-CsTeamsClientConfiguration | Select AllowEmailIntoChannel, RestrictedSenderList

AllowEmailIntoChannel            : True
RestrictedSenderList             : Office365itpros.com;contoso.com;microsoft.com;yandex.com

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.

Resolve-DnsName -Type mx emea.teams.ms

Name                                     Type   TTL   Section    NameExchange                              Preference
----                                     ----   ---   -------    ------------                              ----------
emea.teams.ms                            MX     3599  Answer     emea-teams-ms.mail.protection.outlook.com 0

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?

About the Author

Tony Redmond

Tony Redmond has written thousands of articles about Microsoft technology since 1996. He is the lead author for the Office 365 for IT Pros eBook, the only book covering Office 365 that is updated monthly to keep pace with change in the cloud. Apart from contributing to Practical365.com, Tony also writes at Office365itpros.com to support the development of the eBook. He has been a Microsoft MVP since 2004.

Comments

  1. Carlos Cordeiro

    I am starting to notice some issues with emails that are not showing up on Teams as post. I am utilizing the contacts and distribution list idea. I know you said you haven’t encountered any issues. is that still the case? How many contacts do you have in a distribution list?

    I have also noticed a delay, sometimes over an hour before they appear on the Teams as posts.

    1. Avatar photo
      Tony Redmond

      I haven’t noticed any problems. What kind of messages are you having issues with?

      1. Carlos Cordeiro

        They are just plain emails, with no images or attachments. Seems to work fine when emailing directly, but as soon as its part of distribution group it seems to not work. I did work in the past.

        1. Avatar photo
          Tony Redmond

          How odd. I checked my own tenant and found that emails sent to a Microsoft 365 group are being copied to a Teams channel. Maybe log a call with Microsoft and have them look? At the very least, it would allow Microsoft Teams engineering to investigate.

          1. Carlos Cordeiro

            True. I will give that a shot. I wonder if its because I have Distribution groups inside distribution groups ( 3 levels deep)

          2. Avatar photo
            Tony Redmond

            I am emphatically say that I have never tested that scenario.

  2. Richard Rothman

    We have been using Google Voice for 2FA/MFA where the authenticating system only allowed SMS for 2FA, and multiple people need to be able to login with the same credentials (i.e. Apple, all machines are registered to the same AppleID).

    Anyway I had figured out how to use O365 Transport rules to forward these SMS (MFA) emails from GoogleVoice to the correct private Teams Channel, but all of a sudden the emails aren’t getting to Teams. I’ve tried 3 different ways to do this forwarding (Mail Flow Rules, Mailbox Rules, and even GMAIL Filtering), but it seems somehow Teams is blocking emails that appear to be “Forwarded” (I’m guessing this is somehow recorded in the SMTP headers).

    Is this something you might know about, or how to get around or fix?

    1. Avatar photo
      Tony Redmond

      I just did a quick test and forwarded email doesn’t seem to be the issue. I’d log a support incident and have Microsoft Support look at what’s going on.

      1. Richard

        Hi Tony,
        Thanks, I can get regular emails to Auto-Forward with rules, but seems there is some kind of SPAM filtering that’s blocking forwards of GoogleVoice emails.

        I added a “Category” to verify the rule was being executed – it applied – and forwarded to another O365 mailbox in a different tenant and it landed in that mailbox’s Junk folder which is where I’m guessing it’s landing in Teams.

        I’ll give support a try…

        1. Avatar photo
          Tony Redmond

          Yep. Sounds like there’s something in those messages that cause Exchange Online Protection to consider them to be spam. Maybe it’s just because the email is from Google…

          1. Chris Beckstrand

            Had you found any solution to this? Using Google Voice to teams channel and seeing the exact same thing. I created a MFA@ shared maibox on our tenant and those deliver fine. I then set that to forward to the teams channel and nothing shows up and no NDR. If I manually forward a message it delivers fine so this has to be some filtering on the O365 side.

          2. Avatar photo
            Tony Redmond

            No solution. Then again, I am not paid to pursue solutions to gaps which might appear in Microsoft technology. The only people who fall into that category are Microsoft’s support personnel, which is why you need to work the issue through them rather than here. I can lobby the developers, but quite honestly, when I go to bat to try and get something changed, I focus on more important issues than Google Voice messages not getting to Teams. That’s not what you might like to hear, but it’s an honest answer.

          3. Chris Beckstrand

            The strange thing is text to the Google Voice forwards normally and so does the forward verification so it just seems to be something getting filtered with the actual MFA messages from Duo, Google Apps, ect.

          4. Richard R

            After getting the run-around by MS support, they will not respond to questions or admit there is a SPAM filter, but I’m convince now there is one…

            Yesterday I stumbled on https://support.microsoft.com/en-us/office/send-an-email-to-a-channel-in-teams-d91db004-d9d7-4a47-82e6-fb1b16dfd51e?ui=en-us&rs=en-us&ad=us, in the Troubleshooting section there’s a point “The email includes the channel email address as part of a distribution list. Make sure that the channel email address is being used directly.”

            If you look at the SMTP headers of an example email that gets to a regular mailbox, you will see that the Channel Email address will NOT be in the “To:” field, but rather only in the “X-Forwarded-To:” field, i.e. they are blocking emails that are FORWARDED to the Channel. The email has to be addresses TO the Channel, “forwarded to” is not the same.

            I don’t know when these rules came into force but it must have been very recently, as this process USED to work until a few weeks ago.

          5. Avatar photo
            Tony Redmond

            Where is the Team channel in the hierarchy of your DL? Is it a member of the top-level DL or in one of the nested DLs?

  3. Oded

    Hi Tony,

    We’ve noticed that some email which contain rich format + images are totally ‘mismatched’ while they are landed in the Teams channel… What we get on the Teams side is just the text itself, in the better case, or an unreadable long string, at the worse one.

    Have you encountered with such issues? Is there any solution/workaround for that?

    Rgds,
    Oded.

  4. Andy Fox

    Is there a way to subscribe a Teams channel email address to a listserv server? I have tried doing this, but it appears that the aggressive spam filters operating on emea.teams.ms email addresses. When the confirmation email is sent from the listserv server, it never makes it to the Teams channel email address.

    1. Avatar photo
      Tony Redmond

      If the ListServ server has a poor email reputation, it’s possible that its messages will be suppressed. Try using the advanced settings for the channel to add the domain for the ListServ server as an approved source of messages. It might help.

  5. Adam Jones

    It doesn’t appear that our tennet policies for spam and mail protection are applied, which means more spam will get sent to these addresses than to a shared mailbox if you allow external senders. Often malware will be detected from the defender settings in sharepoint after the email attachment is stored instead of being blocked from delivery to the mailbox.

    1. Avatar photo
      Tony Redmond

      Tenant anti-spam policies are not applied because the email flowing into Teams via a channel address doesn’t go through the standard routes. This is a good reason to restrict inbound email to channels to specific SMTP domains.

  6. Stefan Landqvist

    Hi Tony

    Is there a way where you can email the teams channel (the sender email and subject is identical) and it handled in the same conversation?

    As it is now, every time i email the channel it generates a new conversation.

    Thanks

    1. Avatar photo
      Tony Redmond

      Do you mean can you reply to a channel conversation rather than starting a new conversation? If so, no. The reason is that the email client has no knowledge of the Teams thread (conversation) and can’t pass that information through the connector to Teams.

      1. Stefan Landqvist

        Yes that’s what i mean Tony.
        I figured it wasn’t possible, even though the subject is identical.
        Thanks for the reply.

  7. Aidan Kirkpatrick

    Hi Tony,

    I have noticed that some non-alphanumeric characters in the email’s subject appear to be stripped out of the corresponding eml file name at the time of creation in the channel folder. Do you happen to know if all non-alphanumeric characters get stripped or if there are some that slip through? We have been using some characters as delimiters in email subjects previously but this doesn’t work with the eml files now!

    Kind regards,

    Aidan

    1. Avatar photo
      Tony Redmond

      What kind of characters are stripped? This might be a result of the way messages flow to a hidden mailbox and are then picked up by a connector. I haven’t noticed issues in the past but I suspect I have never used the kind of characters you might be using.

  8. Jenni

    Is there a way to remove the message out of the EmailMessages folder in files and only put the attachments into the files?

    1. Avatar photo
      Tony Redmond

      Not without doing some programming. I imagine that you could use the SharePoint PnP library to find and remove the copies of the email messages.

      1. Jenni

        Thanks Tony appreciate the response

  9. CVA

    I’ve been trying to replace user-managed 365 groups with Team channels for email distribution. The issue I have with doing this is that emails sent to the channel email address only show up in the channel conversations, not in member inboxes. Is there a way to have emails that are sent to the channel address delivered to member’s email addresses?

    1. Avatar photo
      Tony Redmond

      Only by including the users as addressees for the message. A channel email address is not a distribution list.

Leave a Reply