Shell Script Send a Mail

You need to install mail for this script:
#!/bin/bash
echo "Mail content" | mail -s "subject" -a "attachment.zip" toMail@example.com

Install mail
> sudo yum install mail

No comments:

Post a Comment