The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sending Attachments Through mailx vrk1219 HP-UX 4 08-27-2007 08:06 AM
Aix Unix Mailx Attachments darioa AIX 2 10-10-2005 04:53 AM
ksh : using mailx and attachments madmat Shell Programming and Scripting 2 08-01-2005 08:06 PM
multiple attachments edog FAQ Submission Queue 5 01-06-2003 10:09 AM
multiple attachments edog How do I send email? 5 01-06-2003 10:09 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-03-2006
Registered User
 

Join Date: May 2006
Posts: 2
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 file3 | 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.
Attached Images
File Type: jpg mail.jpg (88.7 KB, 9 views)
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-03-2006
indo1144's Avatar
Registered User
 

Join Date: Jun 2002
Location: Netherlands
Posts: 54
Quote:
Originally Posted by ramanam2004
I have written the following code send multiple attachments using mailx

(uuencode file1 file1; uuencode file2 file2; uuencode file3 file3 | 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
Reply With Quote
  #3 (permalink)  
Old 05-03-2006
Registered User
 

Join Date: May 2006
Posts: 2
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.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:35 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0