Uuencode for mail attachments not working

Hi,

I'm trying to send mail with attachments using uuencode , but it doesn't work.

Command (also tried with mailx):

uuencode testfile testfile | mail emailadress

The email I get doesn't have an attachment, and has this in the message body:

begin 664 testfile
%=&5S=`H`
`
end

What's going wrong?

uuencode is extremely old, mail clients are beginning to not understand it. I would try sending to a different email client first, to make sure it's actually going wrong, rather than just being received by a client which doesn't understand uuencode.

1 Like

Thanks, the client is not a problem as it works from another system running Solaris (this one is Red Hat). I just found out about the mailx -a option which also attaches files. I guess I'll use this.

That option is not available on all systems. Hopefully it works for you.

The sharutils package that used to provide uuencode was deprecated in rhel6, since mailx is able to send MIME attachments, as you have already figured out.