mailx Command Examples

Send and receive mail. More information: https://manned.org/mailx.

mailx -s "{{subject}}" {{to_addr}}

echo "{{content}}" | mailx -s "{{subject}}" {{to_addr}}

mailx -s "{{subject}}" {{to_addr}} < {{content.txt}}

mailx -s "{{subject}}" -c {{cc_addr}} {{to_addr}}

mailx -s "{{subject}}" -r {{from_addr}} {{to_addr}}

mailx -a {{path/to/file}} -s "{{subject}}" {{to_addr}}