title: Bypass Outlook hyperlink warning by specific application
body: <p>There is a warning when you send emails via Outlook by using the <code>Microsoft.Office.Interop.Outlook</code> objects. There are several workarounds in form of disabling the complete security warning. That is not applicable in our case. The other options seems to set the protocol used to a registry key.</p>
  <p>So if you add a key like <code>HKCU/SOFTWARE/Microsoft/Office/16.0/Common/Security/Trusted Protocols/All Applications/foo:</code> then all calls from the foo:// protocol are trusted and no warning pops up.</p>
  <p>We use a code like this:</p>
  <pre><code>using Outlook = Microsoft.Office.Interop.Outlook;
  
  Outlook.Application _outlook = new Outlook.Application();
  Outlook.MailItemn _message = null;
  ...
  
  _message = (Outlook.MailItem)_outlook.CreateItem(Outlook.OlItemType.olMailItem);
  Outlook.Recipients recipients = _message.Recipients;
  
  if (!string.IsNullOrEmpty(MailTo))
  {
      string[] mailToList = MailTo.Split(';');
      foreach (string mailToEntry in mailToList)
      {
          Outlook.Recipient recipient = recipients.Add(mailToEntry.Trim());
          recipient.Type = (int)Outlook.OlMailRecipientType.olTo;
          recipient.Resolve();
      }
  }
  
  foreach (MailAttachment attachment in Attachments)
  {
      string tempDir = TempDirectory.Create();
      string tmpFile = Path.Combine(tempDir, attachment.Name);
      File.WriteAllBytes(tmpFile, attachment.Data);
      _message.Attachments.Add(tmpFile, (int)Outlook.OlAttachmentType.olByValue, 1, attachment.Name);
  }
  
  _message.Send();
  </code></pre>
  <p>At least in a shorted form. My question is now: &quot;How could I define this in the registry as exception?&quot;</p>
  <p>Maybe it is possible to create something like <code>HKCU/SOFTWARE/Microsoft/Office/16.0/Common/Security/Trusted Protocols/MyApp/http:</code>?<br>
  This does not work, because the protocol used seems not to be http. Does someone know which one is used here and maybe how to change the name so we could use it in the exception settings?<br>
  Has anyone an idea?</p>