title: Is it possible to embed images into emails sent from tsql that will work on gmail?
body: <p>I have a tsql script</p>
  
  <pre><code>SET @body_custom = '&lt;head&gt;
                  &lt;/head&gt;
                  &lt;body&gt;
                  &lt;img src="cid:testgif.gif" width="267" height="236" alt=""&gt;         
                  &lt;/body&gt;'
  
  EXEC msdb.dbo.sp_send_dbmail 
  @profile_name = @dsysProfileName
  , @recipients = 'email@gmail.com'
  , @subject = 'SQl 2008 R2 Email Test'
  , @body = @body_custom
  , @body_format = 'HTML'
  , @file_attachments = 'D:\testgif.gif'
  </code></pre>
  
  <p>And it attaches a file, and sends it to my email address, but instead of an image i see an empty square. Attachments are properly added. I tried using <code>src="testgif.gif"</code> but it also didn't work. Is there a way to attach an inline image to a message sent to gmail using only tsql?</p>
  
  <p>EDIT: I forgot to mention, adding a link to a https server with the image path does work (the image shows) but I can't use it, it has to be a local imgae</p>