$ echo "Message Body Here" | mailx -s "Subject Here" user@example.com -a path-of-the-file-to-attach
$ echo 'These are contents of my mail' | mailx -s 'This is my email subject' -a /path/to/attachment_file.log email_id@example.com
$ mailx -s "Sending Files" -a First_LocalConfig.conf -a Second_LocalConfig.conf Recipient@myemail.com
s : subject name of the mail
a : path of the files to be attached to the mail
$ echo 'These are contents of my mail' | mailx -s 'This is my email subject' -a /path/to/attachment_file.log email_id@example.com
$ mailx -s "Sending Files" -a First_LocalConfig.conf -a Second_LocalConfig.conf Recipient@myemail.com
s : subject name of the mail
a : path of the files to be attached to the mail
No comments:
Post a Comment