0
votes

We're sending transactional emails to customers now who are using Outlook, Gmail, and other clients.

We want to send Actionable Messages conditionally, only for our Outlook / Office 365 customers (where we would send a completely different transactional email to non-Outlook users), but we're not sure how to determine if a receiver is using Outlook / Office 365 instead of, for instance, Gmail.

  • Is there a way to determine a receiver's email client type before sending?
  • If not, is the best way to logically display actionable messages vs. fallback for other email providers is with conditional tags? i.e. <!--[if mso]><![endif]-->

I also noticed that Gmail sometimes marks emails with <script> tags (which are needed for actionable messages) as dangerous. I've tried only rendering them for Office 365 clients like the below sample, but this doesn't work:

<!--[if mso]>
  <script type="application/adaptivecard+json">
    {
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
        "type": "AdaptiveCard",
        "version": "1.0",
        "originator": "",
        "body": [
            {
                "size": "large",
                "text": "Hello Actionable message",
                "wrap": true,
                "type": "TextBlock"
            }
        ],
        "actions": [
            {
                "type": "Action.InvokeAddInCommand",
                "title": "Open Actionable Messages Debugger",
                "addInId": "3d1408f6-afb3-4baf-aacd-55cd867bb0fa",
                "desktopCommandId": "amDebuggerOpenPaneButton"
            }
        ]
    }
  </script>
<![endif]-->
1

1 Answers

0
votes

You could check if their domain’s email is handled by Microsoft Exchange. While this is imperfect (because customers could be using other email clients to read their Exchange email), it seems likely that most customers with an Exchange mail server will be using Outlook or Outlook.com/Outlook Web Access; conversely, some customers may be using Outlook to read their IMAP or POP email, but we can expect these to be in the minority.

Microsoft Exchange’s autodiscovery (docs) should allow you to detect whether a domain’s email is handled by Exchange.

Microsoft provides an Office 365 Exchange DNS Connectivity Test, which shows the steps it goes through to establish whether Exchange is functioning on a domain. You could script these same steps to determine for each customer whether their domain has Exchange or not.