Send email using SSMTP with the command line on a Raspberry Pi. Step-by-Step Illustrated guide to sending emails through the command line in linux
Source: Send Email from Raspberry Pi Command Line (AlgisSalys.com)
The technique shown in this article, which allows you to send email from the command line or a bash script, uses Gmail to send the mail. It should also work on Debian or Ubuntu based systems.