1

This command line works but there isn't attachment (but works all fine in ubuntu 10.04)

echo "body of your email" | mailx -a "foo.zip" -s "TEST" foo@foo.com

because?

pasaico
  • 13
  • 1
  • 4

1 Answers1

0

You have come across one of the differences between the package bsd-mailx and the package heirloom-mailx. Undoubtedly you are using the bsd-mailx package (the default for Ubuntu) which does not have the -a option to attach files.

The easiest solution is to install the heirloom-mailx package, ensuring first that the bsd-mailx package is removed, and then your command line will function as you intended...

andrew.46
  • 38,003
  • 27
  • 156
  • 232