Sponsored Content
Top Forums UNIX for Advanced & Expert Users Email with multiple attachments & HTML body Post 302483963 by BHM on Wednesday 29th of December 2010 05:56:07 AM
Old 12-29-2010
Email with multiple attachments & HTML body

I have a html file:

Code:
# 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:

Code:
(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.

Last edited by Scott; 02-24-2011 at 03:47 PM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Referring to attached images in html email body through mailx

encoding type for images? (5 Replies)
Discussion started by: biswasbaishali
5 Replies

2. Red Hat

Send HTML body and HTML attachment using MUTT command

Hi there.. I need a proper "mutt" command to send a mail with html body and html attachment at a time. Also if possible let me know the other commands to do this task. Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies

3. Shell Programming and Scripting

How to send email with multiple attachments ?

Hello , I am trying to send an email with two attachments . I have tried all previous suggestion in this forum but none worked. I could send one attachment in an email by uuencode $file "$file" | mailx -m -s "File" xxx@xx.com but unable to send multiple attachments . I have tried ... (8 Replies)
Discussion started by: RaviTej
8 Replies

4. UNIX for Advanced & Expert Users

Mutt for html body and multiple html & pdf attachments

Hi all: Been racking my brain on this for the last couple of days and what has been most frustrating is that this is the last piece I need to complete a project. There are numerous posts discussing mutt in this forum and others but I have been unable to find similar issues. Running with... (1 Reply)
Discussion started by: raggmopp
1 Replies

5. Shell Programming and Scripting

Sending an email with a body and attachments using uuencode

Hi, Im having a bit of an issue with using the uuencode command and sending out an email. My aim is to send an email out which has a body and also have attachments. Currently I can either get one or the other and not both on the same email. uuencode... (4 Replies)
Discussion started by: 02JayJay02
4 Replies

6. Shell Programming and Scripting

Email body not formatted with html and sendmail

Hi All, I am trying to send the contents of a file as email body. I am using html email and sendmail option of unix. I am using the below piece of code for the same : #!/usr/bin/ksh export MAILTO="email@domain.com" export SUBJECT="Report" export BODY="file_directory_path/test_file.txt"... (1 Reply)
Discussion started by: rockygsd
1 Replies

7. Shell Programming and Scripting

SQL query output convert to HTML & send as email body

Hi , I have a sql query in the unix script ,whose output is shown below.I want to convert this output to HTML table format & send email from unix with this table as email body. p_id src_system amount 1 A 100 2 B 200 3 C ... (3 Replies)
Discussion started by: jagadeeshn04
3 Replies

8. Shell Programming and Scripting

HTML table in email body using C Shell

I am using Sun Solaris ver. 5.10 and trying to send an HTML table in email body using mail command in C shell script. I tried following commands:- #1 mail -m "MIME-Version: 1.0;Content-type:text/html;charset=UTF-8" receiver@mail.com < file.html #2 mail -m "Content-type: text/html;" -s "This... (4 Replies)
Discussion started by: jnrohit2k
4 Replies

9. Shell Programming and Scripting

Regarding guidance related to HTML table in email body

Hello All, I have a query here. I am sending an HTML table(which I am creating it by a call to REST API, in a LINUX box) and from there I have to send it into an email. So following are the poins on same: As data is not static so it is writing Dynamic data and creating HTML file. There is... (9 Replies)
Discussion started by: RavinderSingh13
9 Replies

10. HP-UX

Email Using uuenview w/ Multiple Attachments

HP-UX mbhp7640 B.11.31 U ia64 4294967295 unlimited-user license Our database builds a MIME compliant html email, then cats that to sendmail - no problem. Due to horrible issues with the native uuencode, we long ago began using uuenview to encode our attachments - no problem. An example is... (1 Reply)
Discussion started by: bubba77
1 Replies
py_xls2html(1)						      General Commands Manual						    py_xls2html(1)

NAME
py_xls2html - convert an Excel xls file to a html formatted file SYNOPSIS
py_xls2html input-file DESCRIPTION
This manual page was written for the Debian distribution because the original program does not have a manual page. py_xls2html takes an Excel xls file as an argument and converts it to a html formatted file. Output is sent to stdout. Additional utility scripts can be found in the tools/ directory. OPTIONS
This program does not take any command line options. AUTHOR
pyexcelerator and py_xls2html were written by Roman V. Kiseliov <roman@kiseliov.ru>. This manual page was written by Kevin Coyner <kcoyner@debian.org> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. SEE-ALSO pyexcelerator(1), py_xls2txt(1), py_xls2csv(1) October 12, 2006 py_xls2html(1)
All times are GMT -4. The time now is 12:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy