How can I add attachment to mailx mail?
mail -s "my subject" -a /home/foo/dummy.log me@me.com
when using the above I get email and the body test is /home/git/dummy.log
instead of the actual file
How can I add attachment to mailx mail?
mail -s "my subject" -a /home/foo/dummy.log me@me.com
when using the above I get email and the body test is /home/git/dummy.log
instead of the actual file
Take care if you are under HP-UX system you should use this :
( cat message_content_file; ux2dos attachment_file.txt | uuencode attachment_file.txt attachment_file.txt ) | mailx -m -s "subject" -r mail@sender mail@recipient
The attachment file can differ from .txt
Hope it can help !