4

We have a line of code that does this in ksh, to send a file as an attachment in email:

uuencode <filename> <filename.txt> | mailx someone@somewhere.com

In RHEL 5.2 mailx sends filename through as an attachment, but in 6.3 the file content arrives in the target inbox in the body of the message.
It appears that the "6.3" mailx only wants to send an attachment if the "-a" option is used and the content is in a file.

Does anyone know a way of getting the original behaviour?

Also I am interested to know why this behaviour has changed.

  • From the first paragraph of the man page: "It is based on Berkeley Mail 8.1". So that explains the change to the way it works. – Pete Jun 16 '14 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.