title: How to attach html file so that gmail's "view" option works
body: <p>I have a script that sends an email with an html attachment.  When I select "view" in gmail I get text...however when I click on "download" instead of "view", then open it, it displays as it should.</p>
  
  <p>I think it's gmail related because I observe the exact same behavior from IE, FireFox(win/linux), Chrome(win/linux)</p>
  
  <p>I made a youtube video of here:
  <a href="http://www.youtube.com/watch?v=WkGyxcFQXS8" rel="noreferrer">http://www.youtube.com/watch?v=WkGyxcFQXS8</a></p>
  
  <p>Am I doing something wrong?</p>
  
  <p>Thanks</p>