Answers for "send email with attachment from shell script"

1

send email with attachment from shell script

#install mailutils
$ sudo apt-get install mailutils
#comment to send a mail
$ echo "Message Body Here" | mail -s "Subject Here" [email protected] -A backup.zip
or
$ echo "Message Body Here" | mailx -s "Subject Here" -a backup.zip [email protected]
or
$ echo "Message Body Here" | mailx -s "Subject Here" -a backup.log -a test.txt [email protected]
Posted by: Guest on September-24-2021
0

bash send email from script

$ cat /path/to/file | mail -s "your subject" [email protected]
Posted by: Guest on September-16-2020

Code answers related to "send email with attachment from shell script"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language