The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers > Answers to Frequently Asked Questions > How do I send email?
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 04-26-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,119
Quote:
Originally posted by Ygor
Syntax is:
Code:
(  cat body.txt 
   uuencode pic.jpg pic.jpg
) | mailx -s "subject" abc@xyz.com
I tried that on both HP-UX and SunOS. It works on SunOS but fails on HP-UX. I'm not sure how it will behave on other systems. On Linux, I didn't find a mailx, but I tried mail and it worked with that.

With HP-UX, I get a a large body that has the line line of body.txt immediately followed by a "begin 775 xyz.jpg" line. This is actually the behavior that I would expect. It works on SunOS because Sun's mailx is inspecting the mailed text and guessing at the placement of the mime headers. On SunOS, if I switch from mailx to mail, it no longer works.

This would seem to mean that if I intentionally wanted to include a uuencoded item in my body, that Sun's mailx would not let me.