Sending emails from your Ubuntu Drupal development environment in 2 minutes
I use an Ubuntu system when developing Drupal websites. When setting up a development environment in Ubuntu you may need to configure your local development environment to send emails. Here is how I configured my system in less than 2 minutes.
First thing I did was install SSMTP. This is incredibly easy in Ubuntu, just run the following from the terminal.
sudo apt-get install ssmtp
SSMTP will only allow you to send emails through another email system. You could use Gmail to send the email, however I prefer an email delivery service such as Sendgrid (used on all my production sites... and now my development sites). It makes setting up a server to send emails as painless as possible. You can sign up for a free account to try it out at https://sendgrid.com/user/signup
The next thing is to edit the SSMTP config file.
sudo vim /etc/ssmtp/ssmtp.conf
Now add the following configuration options at the bottom of the file (filling in the user name and password accordingly):
Note: If you want to use Gmail to send your emails, this link might help - http://www.nixtutor.com/linux/send-mail-with-gmail-and-ssmtp/