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 multiple attachments deo2k8 Shell Programming and Scripting 1 01-07-2008 10:12 PM
Sending Attachments Through mailx vrk1219 HP-UX 4 08-27-2007 08:06 AM
sending attachments in mail rajendragora UNIX for Dummies Questions & Answers 6 01-31-2007 09:13 PM
sending files as attachments SmartJuniorUnix How do I send email? 9 04-13-2001 04:34 AM
sending files as attachments SmartJuniorUnix UNIX for Dummies Questions & Answers 9 04-13-2001 04:34 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-29-2005
Registered User
 

Join Date: Sep 2005
Location: Chennai
Posts: 80
Question sending attachments via unix

Hi,
I need to send a mail attachment from the UNIX commandline. I'm using Tru64 and the mail client thats supposed receive the attached file (an excel sheet) is Lotus Notes.
Can anybody help me out?
Reply With Quote
Forum Sponsor
  #2  
Old 09-29-2005
Registered User
 

Join Date: Jul 2004
Location: New York State
Posts: 65
I have used the following command line to send an Excel Spreadsheet as an attachment.

(cat /tmp/message.body; uuencode /tmp/VALSP.xls VALSP.xls)| mailx -s "Company Service Orders import file" user@xyz.com

The command assumes that the message body is in the file /tmp/message.body' and the xls file is in /tmp/VALSP.xls
Reply With Quote
  #3  
Old 09-29-2005
Registered User
 

Join Date: Sep 2005
Location: Chennai
Posts: 80
Thanx a lot...works just fine!
Reply With Quote
  #4  
Old 09-30-2005
Registered User
 

Join Date: Sep 2005
Location: Chennai
Posts: 80
Sending attachments---observation,plz suggest

I am noticing sthing funny now----whenever I send an XL file as an attachment, when I open my inbox, I am unable to see the "paper clip" icon that tells you that the mail contains an attachment. But try the same with a JPG file, and I can see the icon.
Am I missing sthing in the MIME? Then why is it tht i see the discrepancy in the 2 cases?What could be leading to this?
Reply With Quote
  #5  
Old 09-30-2005
Registered User
 

Join Date: Jan 2005
Posts: 682
You weren't sending the message using MIME. The format is very different and the encoding is Base64 not UUENCODE.

Your mail client doesn't even have to interpret this as an attachment since uuencoded messages are just text anyway. The mail client has to guess at the file's format when it determines that a uuencoded message text is found. MIME is also converted to text but doesn't have to guess what the file format is since it's specified in the MIME header. You can define your own MIME message segments but they are simply painful. I needed to do this many years ago when email clients were less sofisticated but now it's really not necessary.

You can get a basic idea of MIME's complex structure here.

Last edited by tmarikle; 09-30-2005 at 08:51 AM.
Reply With Quote
  #6  
Old 09-30-2005
Registered User
 

Join Date: Sep 2005
Posts: 22
uuencode [dir/filename] [filename] | mailx -s [subject] mail@address.com


try this it will work !!
Reply With Quote
  #7  
Old 09-30-2005
Registered User
 

Join Date: Jan 2005
Posts: 682
Quote:
Originally Posted by guhas
uuencode [dir/filename] [filename] | mailx -s [subject] mail@address.com


try this it will work !!
That was already suggested and the OP acknowledged that it did work. The OP's question was why was his mail client showing the paperclip icon for one type of attachment uuencoded vs another.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
mailx, mailx attachment

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:21 AM.


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

Content Relevant URLs by vBSEO 3.2.0