<?xml version="1.0" encoding="UTF-8"?>
<!--
  ProtectMyMail — Outlook add-in manifest.

  This is the classic desktop/new-Outlook add-in surface (Office.js). It differs
  from the browser extension in one way that matters: Outlook hands the add-in a
  proper message OBJECT — sender, subject, body, and even the internet headers —
  rather than a rendered page. So verification here is more reliable than DOM
  scraping, and authentication results (SPF/DKIM/DMARC) are actually readable.

  Replace the URLs below with wherever you host the task pane.

  Version must be at least 1.0.0.0. Microsoft's own validator rejects anything
  lower outright ("Manifest Version Too Low"), so a pre-1.0 version number —
  however honest about maturity — makes the add-in impossible to install.
-->
<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>7c1f6c3e-9a1b-4f2e-9c1d-2f4a6b8e1234</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>ProtectMyMail</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="ProtectMyMail"/>
  <Description DefaultValue="Shows who really sent a message, warns when one was altered or imitates a contact, and lets you send mail your provider cannot read."/>
  <IconUrl DefaultValue="https://anuumail.com/assets/icon-64.png"/>
  <HighResolutionIconUrl DefaultValue="https://anuumail.com/assets/icon-128.png"/>
  <SupportUrl DefaultValue="https://anuumail.com/health"/>
  <AppDomains>
    <AppDomain>https://anuumail.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://anuumail.com/taskpane.html"/>
        <RequestedHeight>320</RequestedHeight>
      </DesktopSettings>
    </Form>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://anuumail.com/taskpane.html"/>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <!-- ReadWriteMailbox is required to REPLACE a message body when encrypting.
       Read-only would allow verification but not protection. -->
  <Permissions>ReadWriteMailbox</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit"/>
  </Rule>

  <!--
    VersionOverrides is what actually puts the add-in in the Outlook interface.

    Without it the manifest still validates and side-loading still reports
    success — and then no button appears anywhere, because every current Outlook
    client (web, new Windows, 2016+, Mac, mobile) surfaces add-ins exclusively
    through add-in commands, which are declared here. The FormSettings block
    above is only read by clients that stop at Mailbox requirement set 1.2, and
    is kept solely because manifest validation still demands it.
  -->
  <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">
      <!--
        Must be at least the base manifest's requirement (1.5); a lower value is
        rejected outright. Note that getAllInternetHeadersAsync is a 1.8 API — it
        is called defensively (the code checks the method exists first), so the
        add-in still loads on 1.5 hosts and simply reports no SPF/DKIM/DMARC
        there, rather than excluding those clients entirely.
      -->
      <Requirements>
        <bt:Sets DefaultMinVersion="1.5">
          <bt:Set Name="Mailbox"/>
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <FunctionFile resid="functionFile"/>

            <!-- Reading a message: the verdict. -->
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="pmmReadGroup">
                  <Label resid="groupLabel"/>
                  <Control xsi:type="Button" id="pmmReadButton">
                    <Label resid="readButtonLabel"/>
                    <Supertip>
                      <Title resid="readButtonLabel"/>
                      <Description resid="readButtonTip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="icon16"/>
                      <bt:Image size="32" resid="icon32"/>
                      <bt:Image size="80" resid="icon80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="taskpaneUrl"/>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

            <!-- Writing a message: protect before sending. -->
            <ExtensionPoint xsi:type="MessageComposeCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="pmmComposeGroup">
                  <Label resid="groupLabel"/>
                  <Control xsi:type="Button" id="pmmComposeButton">
                    <Label resid="composeButtonLabel"/>
                    <Supertip>
                      <Title resid="composeButtonLabel"/>
                      <Description resid="composeButtonTip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="icon16"/>
                      <bt:Image size="32" resid="icon32"/>
                      <bt:Image size="80" resid="icon80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="taskpaneUrl"/>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <bt:Image id="icon16" DefaultValue="https://anuumail.com/assets/icon-16.png"/>
          <bt:Image id="icon32" DefaultValue="https://anuumail.com/assets/icon-32.png"/>
          <bt:Image id="icon80" DefaultValue="https://anuumail.com/assets/icon-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="taskpaneUrl" DefaultValue="https://anuumail.com/taskpane.html"/>
          <bt:Url id="functionFile" DefaultValue="https://anuumail.com/taskpane.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="groupLabel" DefaultValue="ProtectMyMail"/>
          <bt:String id="readButtonLabel" DefaultValue="Check this message"/>
          <bt:String id="composeButtonLabel" DefaultValue="Protect"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="readButtonTip" DefaultValue="Check who really sent this message and whether it was altered."/>
          <bt:String id="composeButtonTip" DefaultValue="Sign this message, and encrypt it when the recipient can read it."/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>
