send mail from linux with attachment

PHOTO EMBED

Sat Feb 05 2022 04:40:56 GMT+0000 (Coordinated Universal Time)

Saved by @asksanthosh

$yum install mailx
$ echo "Message Body Here" | mailx -s "Subject Here" -a backup.zip user@example.com

Sample:
[root@fe0vmc2xx7 ~]# echo "PFA the ks-post-1.log file" | mailx -s "ks-post-1.log file from Lab machine" -a ks-post-1.log santhosh.writetome@gmail.com
content_copyCOPY

https://www.tecmint.com/send-email-attachment-from-linux-commandline/