title: Unix sendmail - html embed image not working
body: <p>With the prior posts in SO.com I have tried building my script to send email to my Outlook account with the Image inline in the email body. But the html contents are getting displayed in the html rather displaying the image. Please help.</p>
  
  <p>Here is my snippet</p>
  
  <pre><code>{
  echo "TO: XXX@YYY.com"
  echo "FROM: TEST_IMAGE@YYY.com&gt;"
  echo "SUBJECT: Embed image test"
  echo "MIME-Version: 1.0"
  echo "Content-Type: multipart/related;boundary="--XYZ""
  
  echo "--XYZ"
  echo "Content-Type: text/html; charset=ISO-8859-15"
  echo "Content-Transfer-Encoding: 7bit"
  echo "&lt;html&gt;"
  echo "&lt;head&gt;"
  echo "&lt;meta http-equiv="content-type" content="text/html; charset=ISO-8859-15"&gt;"
  echo "&lt;/head&gt;"
  echo "&lt;body bgcolor="#ffffff" text="#000000"&gt;"
  echo "&lt;img src="cid:part1.06090408.01060107" alt=""&gt;"
  echo "&lt;/body&gt;"
  echo "&lt;/html&gt;"
  
  
  echo "--XYZ"
  echo "Content-Type: image/jpeg;name="sathy.jpg""
  echo "Content-Transfer-Encoding: base64"
  echo "Content-ID: &lt;part1.06090408.01060107&gt;"
  echo "Content-Disposition: inline; filename="sathy.jpg""
  echo $(base64 sathy.jpg)
  echo "' /&gt;"
  echo "--XYZ--"
  }| /usr/lib/sendmail -t
  </code></pre>
  
  <p>Email I received contains the below rather displaying the image,</p>
  
  <pre><code>--XYZ
  Content-Type: text/html; charset=ISO-8859-15
  Content-Transfer-Encoding: 7bit
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv=content-type content=text/html
  &lt;/head&gt;
  &lt;body bgcolor=#ffffff text=#000000&gt;
  &lt;img src=cid:part1.06090408.01060107 alt=&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  --XYZ
  Content-Type: image/jpeg;name=sathy.jpg
  Content-Transfer-Encoding: base64
  Content-ID: &lt;part1.06090408.01060107&gt;
  Content-Disposition: inline; filename=sathy.jpg
  /9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAoAAD/4QNxaHR0cDov
  ....base64 values.....
  /&gt;
  --XYZ--
  ----XYZ--
  </code></pre>
  
  <p>Can you please assist me in what am i missing</p>