Email with multiple attachments & HTML body

December 29, 2010 at 02:47:46
Specs: Windows XP
I have a html file:

# cat sample.html
<html>
<body>

Sample HTML file</p>
</body>
</html>

And I have two excel sheets (sheet1.xls & sheet2.xls)

I want to send an email by having the sample.html as the message body and two spreadsheets as the attachments.

I tried using the below command:

(cat sample.html; uuencode sheet1.xls sheet1.xls; uuencode sheet2.xls sheet2.xls) | mailx -m -s "Test Mail
Content-type: text/html" "recipient address"

We are getting the message body, but the attachments are missing in the email. If I remove the "Content-type: text/html", then I am getting both attachment and the message body, but the message body is coming with html tags and they are actually not getting parsed.

Please provide me a solution.


See More: Email with multiple attachments & HTML body

Report •

#1
March 28, 2011 at 04:17:01
I have the same problem, I cannot attached file with HTML body on sendmail or mailx...

I'm using SunOS 5.8


Report •
Related Solutions


Ask Question