I understand uuencode is for encoding files, and mailx sends mail. However, I'm not exactly understanding...
- Why
uuencode file file | mailx -s "subject" email_adresskeeps sending messages with the encoded content inside the email instead of as an attachment. (And how to go about fixing it...) - I have tried
echo | mailx -s "subject" -a <file> <email_address>and seemed to get my files just fine. But does this mean I am without the protection of encoding or does-agive you that? - I've skimmed there may be better alternatives. Is this really the way to go? I am not particular fluent on the *nix side of things.... Is
mutta good place to start? Are there other suggestions?
This is on RHEL 6.4, uuencode (GNU sharutils) 4.14
Update
Does it matter that mailx version is Heirloom Mail version 12.4 7/29/08? Could the issue be a difference in behavior how mailx treats the uuencode output? Could it be a mailrc setting or some environment variable?
Well, I found another post that seems to have more details on mail headers... I found it helps me understand this issue more, so I'm keeping a link here.
mailxtakes the piped message as message body, you could use mime construct to make an attachment mime constructuudecodeon it just fine.uudecodewas designed to ignore email headers.