Current Articles | RSS Feed
Wouldn't it be nice to have your server send you regular email about system issues? That's an easy task for two simple SMTP email programs, sSMTP and Blat. These utilities don't provide all the options of an enterprise-class mail transfer agent (MTA) such as Sendmail, Qmail, or Postfix, but their simplicity makes them easy to manage and use.
hostname=yourcompany.comroot=yourname@yourcompany.commailhub=smtp.yourcompany.com:25
From:
hostname=yourcompany.comroot=yourname@gmail.commailhub=smtp.gmail.com:587AuthUser=yournameAuthPass=yourpasswordUseSTARTTLS=YESUseTLS=YESAuthMethod=LOGIN
–au
–ap
$ ssmtp recipient@domain.comTo:formal_recipient@domain.comSubject:test ssmtpHello, world!
To:
Subject:
To:recipient@domain.comSubject:Files can be sent from sSMTPYou can email text from the file!
$ ssmtp darkduck@darkduck.com </tmp/ssmtp.txt
To:recipient@domain.comSubject:results of bash scriptHere are the results of bash script:
#copy template to home foldercp /tmp/ssmtptemplate.txt ~#rename file in home foldermv ~/ssmtptemplate.txt send.txt#copy files, adding results to template filecp -r -u -v -L ~/Documents/* ~/bkup/ >>~/send.txt#send the filessmtp recipient@domain.com <~/send.txt#remove the temporary filerm ~/send.txt
cp
–v
full
> c:/blat/blat.exe -installSMTP smtp.yourcompany.com yourname@yourcompany.com
> c:/blat/blat.exe - -to recipient@domain.com -subject "Blat is working!"-body "Here is an email from Blat"
mkdir "c:\backup folder"copy "c:\source folder\*.*" "c:\backup folder\" > "c:\blat body.txt"c:\blat\blat.exe "c:\blat body.txt" -to recipient@domain.com-subject "Batch job has finished"del "c:\blat body.txt"
Allowed tags: <a> link, <b> bold, <i> italics