Problem with multiple excel attachments using mailx


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Problem with multiple excel attachments using mailx
# 1  
Old 05-03-2006
Problem with multiple excel attachments using mailx

I have written the following code send multiple attachments using mailx

(uuencode file1 file1; uuencode file2 file2; uuencode file3 file3Smilie | mailx -s MultipleAttachments -r Sysadmin abc@xyz.com

The attachments are coming properly if the file1,2,3 are either pdf, text, doc. But if these files are excel, then only file1 is coming properly while the rest of the 2 files fills up the email body with un-decoded text. (have attached the actual email with the post)

Can someone tell me why iam facing this strange issue. Thanks in advance.

Ram.
Problem with multiple excel attachments using mailx-mailjpg
# 2  
Old 05-03-2006
Quote:
Originally Posted by ramanam2004
I have written the following code send multiple attachments using mailx

(uuencode file1 file1; uuencode file2 file2; uuencode file3 file3Smilie | mailx -s MultipleAttachments -r Sysadmin abc@xyz.com
I believe the problem has to do with piping, but not entirely sure.

Here's something you could try, this is from one of my live scripts.:
Quote:
(
for graph in output/*_files.gif
do
uuencode $graph $(basename $graph)
done

cat <<EOF
Put your preformatted text here.

EOF
)| mail -s "Performance Graphs for `date +%Y-%m-%d`" user@boo.bar
# 3  
Old 05-04-2006
The above code works except for excel files. For ms excel files the mail comes as junk from second file onwards. not sure if this is a problem with uuencode.
thanks,
ram.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mailx sending attachments to personal email, but not SharePoint?

Hello! I am writing a KornShell script that (in addition to other things) sends a file from a Unix directory to a SharePoint directory. However when executing the script there is no sign of the file on the SharePoint. I have tested the script using my personal email as the destination and the... (3 Replies)
Discussion started by: mattkoz
3 Replies

2. Shell Programming and Scripting

Sending Multiple Attachments using MAILX

I have created a shell scripts and wanted to email users multiple attachments using mailx. I noticed that when I do a man on mailx I see and -a option for attachments. When I run a: mailx -s "test attachments" -a include_file -a exclude_file testuser@mydomain.com (Interrupt -- one more to... (1 Reply)
Discussion started by: metallica1973
1 Replies

3. Shell Programming and Scripting

Problem with multiple mail attachments

Hi everyone... I am facing problem with the multiple mail attachments. cd /work/mohan/pi_log/ mail_file='uuencode ahmedabad.csv ahmedabad.csv ; uuencode ahmedabad_devrpt_20110530.csv ahmedabad_devrpt_20110530.csv' ( $mail_file ) | mailx -m -s"test" domain@website.com its giving me error... (1 Reply)
Discussion started by: mohanm
1 Replies

4. Shell Programming and Scripting

problem with attaching multiple attachments dynamically.

Guys, I've been trying to attach & email all txt files from my directory using the shell script below: #!/usr/bin/sh ################################################################################ send_ml_rej_notn() { FILE_NAME=${1} ATTACH_FILE_NAME=`basename ${FILE_NAME}` if ; then ... (0 Replies)
Discussion started by: bhagat.singh-j
0 Replies

5. Shell Programming and Scripting

mailx problem with multiple cc

I am writing a script to send an email of the result of the process but i cannot make the cc work correctly. RECIP="abc@example.com def@example.com" CC="ghi@example.com jkl@eaxmple.com" mailx -s "testing" -c $CC $RECIP < inputfile.txt Result: To: abc@example.com; def@example.com;... (4 Replies)
Discussion started by: The One
4 Replies

6. Shell Programming and Scripting

Not able to send multiple attachments using uuencode and mailx

Hi, I am seeing some junk characters when I attach the second file, given below is the logic I used. Please help me resolving the issue. ( uuencode file1.txt file1.txt.lst && uuencode file2.txt file2.txt.lst ) > attachment.txt cat body.txt attachment.txt > combinemail.txt mailx -m... (7 Replies)
Discussion started by: prasperl
7 Replies

7. UNIX for Dummies Questions & Answers

Using mailx to save attachments

Hi, I have a requirement to save a mail attachment sent from Windows to a Solaris 9 server. I'm using mailx on the server and have seen a few examples of how to attach a file for sending but none for how to save the attachment when receiving. I can see the encoded text when I look at... (2 Replies)
Discussion started by: Jublio
2 Replies

8. Shell Programming and Scripting

Problem sending excel attachments with MIME::Lite in perl

I am running a perl script that generates an excel doc and then emails it as an attachment. I can generate the excel file fine. I can scp it from the box and open it with no problems. When I send it over email, the file does open properly. The file in email is only 288 B, but on the server it is... (1 Reply)
Discussion started by: Mike_the_Man
1 Replies

9. AIX

Aix Unix Mailx Attachments

I'm trying to send a mailx with an attachment, really I have not do it in a long time. I forgot (3 Replies)
Discussion started by: darioa
3 Replies

10. Shell Programming and Scripting

ksh : using mailx and attachments

Hi I want to use mailx command to send a message included more than one file. I tried to use uuencode in pipe but it could only generate one file. I would avoid using an archive file :p Thanks to read you. Mathieu (2 Replies)
Discussion started by: madmat
2 Replies
Login or Register to Ask a Question