title: Shell script embed multiple image with sendmail
body: <p>I'm using following script to embed multiple image on a mail using sendmail function. </p>
  
  <pre><code>sendmail -t &lt;&lt;EOT
  TO: example_to@xyz.com
  FROM: example_from@xyz.com
  Cc: example_cc@xyz.com
  SUBJECT: Phobos Report 
  MIME-Version: 1.0
  Content-Type: multipart/related;boundary="XYZ"
  
  --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; charset=ISO-8859-15"&gt;
  &lt;/head&gt;
  &lt;body bgcolor="#ffffff" text="#000000"&gt;
  &lt;img src="cid:part1.06090408.01060107" alt=""&gt;&lt;br/&gt;
  &lt;img src="cid:part2.06090408.01060107" alt=""&gt;&lt;br/&gt;
  &lt;img src="cid:part3.06090408.01060107" alt=""&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  --XYZ
  Content-Type: image/jpeg;name="rag1.jpg"
  Content-Transfer-Encoding: base64
  Content-ID: &lt;part1.06090408.01060107&gt;
  Content-Disposition: inline; filename="rag1.jpg"
  
  $(base64 rag1.jpg)
  
  --XYZ
  
  Content-Type: image/jpeg;name="rag2.jpg"
  Content-Transfer-Encoding: base64
  Content-ID: &lt;part2.06090408.01060107&gt;
  Content-Disposition: inline; filename="rag2.jpg"
  
  $(base64 rag2.jpg)
  
  --XYZ
  
  Content-Type: image/jpeg;name="rag3.jpg"
  Content-Transfer-Encoding: base64
  Content-ID: &lt;part3.06090408.01060107&gt;
  Content-Disposition: inline; filename="rag3.jpg"
  
  $(base64 rag3.jpg)
  --XYZ--
  EOT
  </code></pre>
  
  <p>Here only the first image getting embedded. And all the others are failed to get added. Those two images are added as text based attachment. How can I add multiple images on this script?</p>