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_adress
keeps 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-a
give 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
mutt
a 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.
mailx
takes the piped message as message body, you could use mime construct to make an attachment mime construct – Feb 19 '14 at 19:54uudecode
on it just fine.uudecode
was designed to ignore email headers. – Mark Plotnick Feb 19 '14 at 19:56