Mail command to send attachements

I tried the below command

uuencode data.txt | mailx -s �Test Mail� �mrp@xyz.com�

But I get the below error

ksh: uuencode: not found.
Null Message body;  hope that' ok

which clearly tell that uuencode utility is not found.

Is there any other way to send attachments with mail through command line.
At the same time I don't have admin access for the same to install the utility (I use AIX 5.X version Server)

It is probably not a PATH problem as uuencode resides in /usr/bin and if this is not in the PATH you'd probably have bigger problems than finding uuencode . If uuencode is not installed you have to install the package bos.net.uucp to get it.

The package is part of the standard distribution of AIX, so you find it on your installation medium.

I hope this helps.

bakunin

Thanks bakunin!

Unfortunately I dont have admin access for that machine.

In this case get the admin going! There is no sense in trying to do with workarounds instead of using supported software.

I hope this helps.

bakunin

How about using sendmail instead?

The problem is not the mailer itself. You need something to encode the parts of a multipart/mime message prior to constructing it. Sending binary data (like pictures, ...) directly, without encoding them first to fit into basic ASCII, is considered bad style, at least by RFC822-purists. But then, having 300-lines-signature-files with animated GIFs in true-color, abusing HTML for mails and similar original sins is against RFC822 too and nobody cares.

bakunin

If uuencode is missing then how about using base64 ?

yes, that (and a few other encoders/decoders) would work too as they can uuencode/decode as well, but to install it you'd need superuser rights and the thread opener said he doesn't have them. So the best advice i could think of is to get the admin to install it. Installing it is no big deal as it is on the standard distribution medium. It is not like you would have to extensively search for anything, just put the installation CD in and start installation.

bakunin