How can I send an email through the UNIX mailx command?

an example

$ echo "something" | mailx -s "subject" [email protected]

to send attachment

$ uuencode file file | mailx -s "subject" [email protected]

and to send attachment AND write the message body

$ (echo "something\n" ; uuencode file file) | mailx -s "subject" [email protected]

Leave a Comment