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 Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sending Attachments Through mailx vrk1219 HP-UX 7 01-21-2009 03:18 PM
Aix Unix Mailx Attachments darioa AIX 3 01-07-2009 01:09 PM
ksh : using mailx and attachments madmat Shell Programming and Scripting 2 08-02-2005 12:06 AM
multiple attachments edog FAQ Submission Queue 5 01-06-2003 02:09 PM
multiple attachments edog How do I send email? 5 01-06-2003 02:09 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-03-2006
ramanam2004 ramanam2004 is offline
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 Thumbnails
problem-multiple-excel-attachments-using-mailx-mail.jpg  
  #2 (permalink)  
Old 05-03-2006
indo1144's Avatar
indo1144 indo1144 is offline
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
  #3 (permalink)  
Old 05-04-2006
ramanam2004 ramanam2004 is offline
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0