title: How can I send an HTML email with Perl?
body: <p>I am trying to send an HTML email using Perl.</p>
  
  <pre><code> open(MAIL,"|/usr/sbin/sendmail -t");
  
      ## Mail Header
      print MAIL "To: $to\n";
      print MAIL "From: $from\n";
      print MAIL "Subject: $subject\n\n";
      ## Mail Body
      print MAIL "Content-Type: text/html; charset=ISO-8859-1\n\n"
          . "&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;@emailBody";
   close(MAIL)
  </code></pre>
  
  <p>Is that the correct way of doing it? It is not working for some reason. Thanks for your help.</p>