title: compose new outlook email with html template
body: <p>My PowerShell script is opening a new compose outlook email window and setting the body to a string that contains HTML, but it is not rendering the HTML. Any ideas how to achieve this? </p>
  
  <pre><code>function Prepare_Outlook_email( $subject, $body, $to){
      $ol = New-Object -comObject Outlook.Application
      $mail = $ol.CreateItem(0)
      $mail.Subject = $subject
      $mail | Get-Member
      # $mail.IsBodyHTML = $true  ###doesnt work
      # $mail.HTMLBody = $body ###doesnt work the email format is already HTML
      $mail.Body = $body
      $mail.To = $to 
      $inspector = $mail.GetInspector
      $inspector.Activate()
  }
  </code></pre>
  
  <p><code>$body</code> is the following string. </p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;test&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;table&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      Dear firstname,
                      Please visit &lt;a href="www.google.com"&gt;here&lt;/a&gt;
  
                      Kind Regards,
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any ideas on how to make the HTML be interpreted. The main problem is that I need to be able to insert hyperlinks. I could live with the HTML not being interpreted if you can tell me a different way to get hyperlinks to work. </p>
  
  <p>I found this old post that suggested using <code>{ HYPERLINK ="www.google.com" }</code> but that didn't seem to work either.</p>
  
  <p><a href="https://i.stack.imgur.com/qJOfe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qJOfe.png" alt="enter image description here"></a></p>