title: Add pics from Google Drive to html email body
body: <p>Is it possible to add a png / gif file from the google disk to the email htmlbody generated by the google script? I have the code as below, the document is publicly shared, Drive API and Gmail API are enabled.
  Is this a problem sharing the file from the disk or an error in my code, please help</p>
  <pre class="lang-js prettyprint-override"><code>function sendaEmail(){
    var templ = HtmlService
    .createTemplateFromFile('template');
    
    var message = templ.evaluate().getContent();
    
    MailApp.sendEmail({
      to: 'email@gmail.com',
      subject: &quot;subject&quot;,
      htmlBody: message
    });
  }
  </code></pre>
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE XHTML 1.0 Transitional//EN&quot;&gt;
  &lt;html&gt;
   &lt;head&gt;
      &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
        &lt;title&gt;Title&lt;/title&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;/&gt;
    &lt;/head&gt;
    &lt;body style=&quot;margin: 0; padding: 0;&quot;&gt;
      &lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;600&quot; style=&quot;border-collapse: collapse;&quot;&gt;
              &lt;tr&gt;
                &lt;td align=&quot;center&quot; bgcolor=&quot;#70bbd9&quot; style=&quot;padding: 40px 0 30px 0;&quot;&gt;
                  &lt;img src= &lt;?= DriveApp.getFileById(&quot;1tKxUgeX_B27vnpNNpKy1jF_0zOxrBhmL&quot;).getAs(&quot;image/gif&quot;);?&gt; alt=&quot;Creating Email&quot; width=&quot;300&quot; height=&quot;230&quot; style=&quot;display: block;&quot; /&gt;
                &lt;/td&gt;
              &lt;/tr&gt;
            &lt;/table&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>