Difficulty to send image in mail body.

I have jpg file in my server. I am facing difficulty while sending the image in body . appreciate your help to fix to below code.

 echo "--FILEBOUNDARY"
        echo "Content-Type: image/jpg"
        echo "Content-Disposition: inline; filename=\"tick.jpg\""
        echo "Content-Transfer-Encoding: base64"
        echo "Content-Id: <tickjpeg>"
 ############## Starts Reports##########
 
(
  echo To: jewel@xxx.com
  echo From: healthcheck@yyy.com
  echo "Content-Type: text/html; "
  echo Subject:System availability status of : `date "+%d-%b-%Y"`
  echo
  cat test.html
) | sendmail -t

 

---------- Post updated 09-27-15 at 12:05 AM ---------- Previous update was 09-26-15 at 05:27 PM ----------

Could you please try ..

You have shown us 5 lines of data that will be printed to the standard output of your script (not included in the body of your message and not as an attachment).

You have said that the body of your message does not correctly display the image you want it to include, but you have not shown us the contents of the file test.html (which contains the text that makes up the entire body of the message you're sending).

So, about all that we can say is that something in the HTML code in test.html is not correctly displaying the image you want to display. But, you already know that...

<html>
<body>
</v:shapetype><v:shape id="Picture_x0020_2" o:spid="_x0000_s1026" type="#_x0000_t75" alt="GREEN" style='position:absolute;margin-left:268.5pt;margin-top:5.95pt;width:104.25pt;height:27.75pt;z-index:251658240;visibility:visible;mso-wrap-style:square;mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;mso-width-relative:page;mso-height-relative:page'><v:imagedata src=YOY1.png o:title=GREEN />
<span style='mso-ignore:vglayout;position:absolute;z-index:251658240;margin-left:358px;margin-top:8px;width:139px;height:37px'><img width=139 height=37 src=YOY2.png alt=GREEN v:shapes=Picture_x0020_2></span><![endif]><span style='font-size:10.0pt;font-family:Tahoma,sans-serif;color:blue'><o:p></o:p></span></p><div align=center><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 style='margin-left:30.2pt;border-collapse:collapse'><tr style='height:23.35pt'><td width=105 valign=top style='width:78.9pt;padding:0in 5.4pt 0in 5.4pt;height:23.35pt'><p class=MsoNormal align=right style='text-align:right'><b><span style='font-size:14.0pt;font-family:Tahoma,sans-serif;color:black'>YOY</span></b><b><span style='font-size:14.0pt;font-family:Tahoma,sans-serif'><o:p></o:p></span></b></p></td><td width=138 valign=top style='width:103.5pt;padding:0in 5.4pt 0in 5.4pt;height:23.35pt'></td></tr></table></div></td></tr><tr style='height:121.6pt'><td width=732 valign=top style='width:549.3pt;padding:0in 5.4pt 0in 5.4pt;height:121.6pt'><p class=MsoNormal><b>YOY - <span style='color:#33CC33'>GREEN</span><o:p></o:p></b></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-family:Symbol'><span style='mso-list:Ignore'>�<span style='font:7.0pt Times New Roman'>�������� </span></span></span><![endif]><b>YOY Online accessibility</b>:� YOY Production web interface is working fine and able to access the screens. <o:p></o:p></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-family:Symbol'><span style='mso-list:Ignore'>�<span style='font:7.0pt Times New Roman'>�������� </span></span></span><![endif]><b>End of day batch</b>: Successful and business date verified and system is available for next business date.<o:p></o:p></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-family:Symbol;color:black'><span style='mso-list:Ignore'>�<span style='font:7.0pt Times New Roman'>�������� </span></span></span><![endif]><b>Reports Status</b>: Treasury Reports are generated and sent successfully.<span style='color:black'><o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-family:Symbol;color:black'><span style='mso-list:Ignore'>�<span style='font:7.0pt Times New Roman'>�������� </span></span></span><![endif]><b>Month End Closing</b>: NA<span style='color:black'><o:p></o:p></span></p></td></tr><tr style='height:8.9pt'><td width=732 valign=top style='width:549.3pt;padding:0in 5.4pt 0in 5.4pt;height:8.9pt'><p><strong><span style='font-size:7.5pt;font-family:Arial,sans-serif;font-weight:normal'>Please contact</span></strong><strong><span style='font-size:7.5pt;font-family:Arial,sans-serif'> <i>**CPB CH Technology - Production Support</i> </span></strong><strong><span style='font-size:7.5pt;font-family:Arial,sans-serif;font-weight:normal'>for any questions/updates.</span></strong><b><span style='font-family:Arial,sans-serif'><o:p></o:p></span></b></p></td></tr></table><p class=MsoNormal><span style='color:#1F497D'><o:p>�</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>�</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>�</o:p></span></p><p class=MsoNormal><b><span style='color:#17365D'><o:p>�</o:p></span></b></p>
</body>
</html>

The image YOY1.png is a file local to the sender and thus not accessible at the receiver. Add a valid URL.