I'm using following script to embed multiple image on a mail using sendmail function.
sendmail -t <<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
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#ffffff" text="#000000">
<img src="cid:part1.06090408.01060107" alt=""><br/>
<img src="cid:part2.06090408.01060107" alt=""><br/>
<img src="cid:part3.06090408.01060107" alt="">
</body>
</html>
--XYZ
Content-Type: image/jpeg;name="rag1.jpg"
Content-Transfer-Encoding: base64
Content-ID: <part1.06090408.01060107>
Content-Disposition: inline; filename="rag1.jpg"
$(base64 rag1.jpg)
--XYZ
Content-Type: image/jpeg;name="rag2.jpg"
Content-Transfer-Encoding: base64
Content-ID: <part2.06090408.01060107>
Content-Disposition: inline; filename="rag2.jpg"
$(base64 rag2.jpg)
--XYZ
Content-Type: image/jpeg;name="rag3.jpg"
Content-Transfer-Encoding: base64
Content-ID: <part3.06090408.01060107>
Content-Disposition: inline; filename="rag3.jpg"
$(base64 rag3.jpg)
--XYZ--
EOT
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?