If you are running a Debian server, you must be running some automated processes like database dump, log cleaning, data backup, …
When processing these batch treatments, it can be very convenient to get some completion reports sent by email.
Under debian, you can send mails thru command line with the help of sendmail and exim4 as a mail transfert agent. But you previously need to configure them to use an official smtp server.
This article will explain how to configure your Debian Wheezy server to be able to send emails from command line by using the smtp server provided with your Gmail account.
Configuration is given for a Gmail account, but it can obviously be adapted to any other smtp provider.
This article has been tested on a freshly installed Amd64 Debian Wheezy.