Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using mail (sendmail) to send attachments 2

Status
Not open for further replies.

ericmc

Vendor
Apr 4, 2001
8
US
Is there a way to send attachments using the UNIX mail command? If not, is there a 3rd party software that runs on AIX that will do it?

Thanks,
Eric
 
You need to install bos.net.uucp and "uudecode" to send the attachments.

If you go down that route, I think you'll have success.

Bill.
 
From Past Postings in this forum I have pieced together the following which works very well.

Use this command to attach a file in unix and send to notes


filename1= the file in unix u want to send
filename2= the file name of attatchment to recieve in notes
test= The name for the subject field
email@name.com= email address to send to

Command:

cat filename1 |uuencode filename2|mailx -s "test" email@aexp.com
 
If a user sends an e-mail containing an attachment, how can I extract the attachment into a specific file?
 
If it doesn't automatically do it when you read it....
...since you are naming the file above to be on the receiving machine.............
it should show up in whatever directory you are in when you read the mail....
if it doesn't, after you read it, you can

uudecode $HOME/myfilename

There may be other ways as well....
 
Hi Eric,
I use the pipe command to include an attachment;

mail -s '[subject]' [email address] < [filename]

Brian...
 
Using the redirect < will put the contents of your file into the body/text of your email and not as an attachment. This can sometimes be even better than an attachment. Remember, amateurs built the Ark, professionals built the Titanic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top