0

I am trying to generate some report and send it through unix. This report contains PIE-charts any idea how to inline send charts in mail body.

I tried below code. HTML is working in browser but after I send the HTML over mail it does not shows anything in mail body.

`MAILTO="x@a.com"
FROM='y@x.com'
CONTENT="pi.html"
SUBJECT="test"
(
 echo "To:$MAILTO"
 echo "From:$FROM"
 echo "Cc:$CC"
 echo "Subject: $SUBJECT"
 echo "MIME-Version: 1.0"
 echo "Content-Type: text/html"
 echo "Content-Disposition: inline"
 cat $CONTENT
) |  /usr/sbin/sendmail -t`

content of pi.html ( I have copied the content from the url and pasted in pi.html) https://developers.google.com/chart/interactive/docs/gallery/piechart

Please suggest a way to handle this.

user1011046
  • 204
  • 1
  • 5
  • 16
  • What is the html code you are sending? You say that `content of pi.html https://developers.google.com/chart/interactive/docs/gallery/piechart`. Do you mean that you are sending a link in the email, or do you mean that you copy and pasted the page source from that google API page into an html file and sent it as an email? – zero298 Jan 22 '15 at 17:19
  • Do you mean that the actual email has nothing in it or do you mean that the email is not displaying correctly whenever you open it? – zero298 Jan 22 '15 at 17:40
  • the code from url https://developers.google.com/chart/interactive/docs/gallery/piechart is copied to pi.html, then sending pi.html is mail using sendmail – user1011046 Jan 22 '15 at 18:43
  • @zero298 and actual email have nothing in it – user1011046 Jan 22 '15 at 18:46

0 Answers0