Can't find what you're looking for? Use of one of the search websites below …

Home*nixos commandsmailx

mailx

Published on Friday, August 24, 2007

man: NAME: mailx, mail – interactive message processing system

send file as attachment

Use uuencode to encode a file and pipe it to mailx to be send as attachment (when you quickly need a file on your desktop it’s faster then ftp…)

uuencode file to mailx
$ uuencode file.txt file.txt | mailx -s file.txt <your-email-address>
$ 

In my environment the -r flag (return address) is needed since my mailserver is blocking mail without a known email address reply header.

uuencode file to mailx with -r flag
$ uuencode file.txt file.txt | mailx -s file.txt -r <your-email-address> <your-email-address>
$ 

Leave a Reply