<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
To disable ItemSend and use OnMessageSend (smart alerts) only:
- Comment out the OnMessageSend LaunchEvent and uncomment the <Event> block containing ItemSend
To disable  OnMessageSend (smart alerts) and use ItemSend only:
- Comment out the <Event> block containing ItemSend and uncomment the OnMessageSend LaunchEvent.
-->
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
           xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
  <Id>3d0b651b-0fac-4f63-b3c7-644660256369</Id>
  <Version>2.0.33</Version>
  <ProviderName>XQ Message Inc</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="XQ Outlook Enterprise"/>
  <Description DefaultValue="[v2.0.33] Data protection and email security for professionals and businesses when collaborating with customers and suppliers."/>
  <IconUrl DefaultValue="https://o365.xqmsg.com/assets/xqlogo2x-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://o365.xqmsg.com/assets/xqlogo2x-128.png"/>
  <SupportUrl DefaultValue="https://xqmsg.co/contact-us" />
  <AppDomains>
    <AppDomain>https://xqmsg.com</AppDomain>
    <AppDomain>https://xqmsg.net</AppDomain>
    <AppDomain>https://xqmsg.co</AppDomain>
    <AppDomain>https://circle.xqmsg.net</AppDomain>
    <AppDomain>https://*.xqm.internal</AppDomain>
    <AppDomain>https://o365.xqmsg.com</AppDomain>
      <AppDomain>https://o365.xqmsg.dev</AppDomain>
    <AppDomain>https://outlook-ext.xqmsg.com</AppDomain>
    <AppDomain>https://localhost:4080</AppDomain>
    <AppDomain>https://localhost:3222</AppDomain>
    <AppDomain>https://outlook.local</AppDomain>
    <AppDomain>https://outlook.local:3222</AppDomain>
    <AppDomain>https://*.xqmsg.cloud</AppDomain>
    <AppDomain>https://login.microsoftonline.com</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.5"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://o365.xqmsg.com/index.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteMailbox</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">

      <Requirements>
        <bt:Sets DefaultMinVersion="1.5">
          <bt:Set Name="Mailbox"/>
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <Runtimes>
            <Runtime resid="Commands.Url"  lifetime="short" >
              <Override type="javascript" resid="Commands.Script.Url"/>
            </Runtime>
          </Runtimes>
          <DesktopFormFactor>
            <FunctionFile resid="Commands.Url"/>
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgReadGroup">
                  <Label resid="ReadGroup.Label"/>
                  <Control xsi:type="Button" id="msgReadOpenPaneButton">
                    <Label resid="ReadMessage.Label"/>
                    <Supertip>
                      <Title resid="ReadMessage.Label"/>
                      <Description resid="ReadMessage.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon2x.16x16"/>
                      <bt:Image size="32" resid="Icon2x.32x32"/>
                      <bt:Image size="80" resid="Icon2x.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="ReadMessage.Url"/>
                    </Action>
                  </Control>

                  <Control xsi:type="Button" id="helpOpenButton">
                    <Label resid="Help.Label"/>
                    <Supertip>
                      <Title resid="Help.Label"/>
                      <Description resid="Help.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="HelpIcon2x.16x16"/>
                      <bt:Image size="32" resid="HelpIcon2x.32x32"/>
                      <bt:Image size="80" resid="HelpIcon2x.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="HelpCenter.Url"/>
                    </Action>
                  </Control>

                  <Control xsi:type="Button" id="settingsOpenButton">
                    <Label resid="Settings.Label"/>
                    <Supertip>
                      <Title resid="Settings.Label"/>
                      <Description resid="Settings.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="SettingsIcon2x.16x16"/>
                      <bt:Image size="32" resid="SettingsIcon2x.32x32"/>
                      <bt:Image size="80" resid="SettingsIcon2x.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Settings.Url"/>
                    </Action>
                  </Control>

                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgWriteGroup">
                  <Label resid="WriteGroup.Label"/>
                  <Control xsi:type="Button" id="ActionButton">
                    <Label resid="EncryptMessageButton.Label"/>
                    <Supertip>
                      <Title resid="EncryptMessageButton.Label"/>
                      <Description resid="EncryptMessageButton.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon2x.16x16"/>
                      <bt:Image size="32" resid="Icon2x.32x32"/>
                      <bt:Image size="80" resid="Icon2x.80x80"/>
                    </Icon>
                    <Action xsi:type="ExecuteFunction">
                      <FunctionName>onEncryptMessage</FunctionName>
                    </Action>
                  </Control>

                  <Control xsi:type="Button" id="composeHelpOpenButton">
                    <Label resid="Help.Label"/>
                    <Supertip>
                      <Title resid="Help.Label"/>
                      <Description resid="Help.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="HelpIcon2x.16x16"/>
                      <bt:Image size="32" resid="HelpIcon2x.32x32"/>
                      <bt:Image size="80" resid="HelpIcon2x.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="ComposeHelp.Url"/>
                    </Action>
                  </Control>

                  <Control xsi:type="Button" id="composeSettingsOpenButton">
                    <Label resid="Settings.Label"/>
                    <Supertip>
                      <Title resid="Settings.Label"/>
                      <Description resid="Settings.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="SettingsIcon2x.16x16"/>
                      <bt:Image size="32" resid="SettingsIcon2x.32x32"/>
                      <bt:Image size="80" resid="SettingsIcon2x.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="ComposeSettings.Url"/>
                    </Action>
                  </Control>

                </Group>
              </OfficeTab>
            </ExtensionPoint>
            <ExtensionPoint xsi:type="LaunchEvent">
              <LaunchEvents>
                <!-- Uncomment the line below for SmartAlerts only (and comment out the ItemSend Extension point) -->
                <!--LaunchEvent Type="OnMessageSend" FunctionName="onUserMessageSend" /-->
                <LaunchEvent Type="OnSensitivityLabelChanged" FunctionName="onMessageSensitivityChanged" />
              </LaunchEvents>
              <SourceLocation resid="Commands.Url"/>
            </ExtensionPoint>
            <!-- Uncomment the block below for ItenSend only (and comment out the OnMessageSend launch event) -->
            <ExtensionPoint xsi:type="Events">
              <Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="autoEncrypt" />
            </ExtensionPoint>
            <ExtensionPoint xsi:type="DetectedEntity">
              <Label resid="EncryptedContent.Label" />
              <SourceLocation resid="ReadMessageBasic.Url" />
              <Rule xsi:type="RuleCollection" Mode="Or">

                <Rule xsi:type="RuleCollection" Mode="And">
                  <Rule xsi:type="ItemIs" ItemType="Message" />

                  <Rule xsi:type="ItemHasRegularExpressionMatch" PropertyName="BodyAsPlaintext" IgnoreCase="false" RegExName="xqContent"
                        RegExValue="(You\'ve been sent an XQ encrypted message.)"
                        Highlight="all" />
                </Rule>

                <Rule xsi:type="RuleCollection" Mode="And">
                  <Rule xsi:type="ItemIs" ItemType="Message" />

                  <Rule xsi:type="ItemHasRegularExpressionMatch" PropertyName="BodyAsPlaintext" IgnoreCase="false" RegExName="xqContent"
                        RegExValue="Encrypted Message"
                        Highlight="all" />
                </Rule>

                <Rule xsi:type="RuleCollection" Mode="And">
                  <Rule xsi:type="ItemIs" ItemType="Message" />

                  <Rule xsi:type="ItemHasRegularExpressionMatch" PropertyName="BodyAsPlaintext" IgnoreCase="true" RegExName="xqContent"
                        RegExValue="Read this message with the Outlook Add-in"
                        Highlight="all" />
                </Rule>

                <Rule xsi:type="RuleCollection" Mode="And">
                  <Rule xsi:type="ItemIs" ItemType="Message" />

                  <Rule xsi:type="ItemHasRegularExpressionMatch" PropertyName="BodyAsPlaintext" IgnoreCase="true" RegExName="xqContent"
                        RegExValue="Unlock this message with the Outlook Add-in"
                        Highlight="all" />
                </Rule>

              </Rule>


            </ExtensionPoint>

          </DesktopFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="Icon2x.16x16" DefaultValue="https://o365.xqmsg.com/assets/xqlogo2x-16.png"/>
          <bt:Image id="Icon2x.32x32" DefaultValue="https://o365.xqmsg.com/assets/xqlogo2x-32.png"/>
          <bt:Image id="Icon2x.80x80" DefaultValue="https://o365.xqmsg.com/assets/xqlogo2x-80.png"/>

          <bt:Image id="HelpIcon2x.16x16" DefaultValue="https://o365.xqmsg.com/assets/help2x-16.png"/>
          <bt:Image id="HelpIcon2x.32x32" DefaultValue="https://o365.xqmsg.com/assets/help2x-32.png"/>
          <bt:Image id="HelpIcon2x.80x80" DefaultValue="https://o365.xqmsg.com/assets/help2x-80.png"/>

          <bt:Image id="SettingsIcon2x.16x16" DefaultValue="https://o365.xqmsg.com/assets/cog2x-16.png"/>
          <bt:Image id="SettingsIcon2x.32x32" DefaultValue="https://o365.xqmsg.com/assets/cog2x-32.png"/>
          <bt:Image id="SettingsIcon2x.80x80" DefaultValue="https://o365.xqmsg.com/assets/cog2x-80.png"/>


        </bt:Images>
        <bt:Urls>
          <bt:Url id="Commands.Url" DefaultValue="https://o365.xqmsg.com/commands.html"/>
          <bt:Url id="Commands.Script.Url" DefaultValue="https://o365.xqmsg.com/commands.js"/>
          <bt:Url id="ReadMessage.Url" DefaultValue="https://o365.xqmsg.com/index.html?pane=read&amp;compose=false"/>
          <bt:Url id="ReadMessageBasic.Url" DefaultValue="https://o365.xqmsg.com/index.html?pane=read&amp;compose=false&amp;view=basic"/>
          <bt:Url id="Settings.Url" DefaultValue="https://o365.xqmsg.com/index.html?pane=settings&amp;compose=false"/>
          <bt:Url id="ComposeSettings.Url" DefaultValue="https://o365.xqmsg.com/index.html?pane=settings&amp;compose=true"/>
          <bt:Url id="HelpCenter.Url" DefaultValue="https://o365.xqmsg.com/index.html?pane=help&amp;compose=false"/>
          <bt:Url id="ComposeHelp.Url" DefaultValue="https://o365.xqmsg.com/index.html?pane=help&amp;compose=true"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="XQ Outlook"/>
          <bt:String id="TaskpaneButton.Label" DefaultValue="Read Message"/>
          <bt:String id="ActionButton.Label" DefaultValue="Perform an action"/>

          <bt:String id="ReadGroup.Label" DefaultValue="XQ Outlook"/>
          <bt:String id="ReadMessage.Label" DefaultValue="Read With XQ"/>
          <bt:String id="Help.Label" DefaultValue="Help Center"/>
          <bt:String id="Settings.Label" DefaultValue="Settings"/>
          <bt:String id="WriteGroup.Label" DefaultValue="XQ Encryption"/>
          <bt:String id="EncryptMessageButton.Label" DefaultValue="Encrypt Message"/>
          <bt:String id="EncryptedContent.Label" DefaultValue="XQ Decrypted Content"/>

        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="ReadMessage.Tooltip" DefaultValue="Decrypt this message with the XQ add-in."/>
          <bt:String id="Settings.Tooltip" DefaultValue="Opens up the XQ settings pane."/>
          <bt:String id="Help.Tooltip" DefaultValue="Opens up the XQ Help Center"/>
          <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/>
          <bt:String id="ActionButton.Tooltip" DefaultValue="Perform an action when clicked."/>
          <bt:String id="EncryptMessageButton.Tooltip" DefaultValue="Encrypt an outgoing message."/>
        </bt:LongStrings>
      </Resources>
      <WebApplicationInfo>
        <Id>34698deb-a88f-4a13-9bc9-057c3a7284cd</Id>
        <Resource>api://o365.xqmsg.com/34698deb-a88f-4a13-9bc9-057c3a7284cd</Resource>
        <Scopes>
          <Scope>offline_access</Scope>
          <Scope>openid</Scope>
          <Scope>profile</Scope>
          <Scope>user.read</Scope>
          <Scope>mail.send</Scope>
          <Scope>files.read</Scope>
        </Scopes>
      </WebApplicationInfo>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>