This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to connect to SMTP and send mail to it | |
# returns: | |
# 0 - SUCCESS | |
# 1 - FAILURE: unable to complete session to DATA command | |
# 2 - FAILURE: problems after DATA command (server did not enqueue the message) | |
function bash_mail(){ | |
# Default configuration | |
# Can be overridden by ARGV in order: TO, SUBJECT, MESSAGE, FROM, SERVER |