Sending mail from the command line, in an automated way

Solution 1:

SendEmail seems like a nice tool for that. From what I get from the documentation it would be just a call like this:

sendEmail -f <myadress> -t <destination> -u <subject> -m <message> -a <pathtofile> -s <serveradress> -xu <username> -xp <password>

Solution 2:

Another option is the ssmtp package. Since it's a sendmail emulator, it is highly compatible with all kinds of stuff that might want to send email.