Pages

Monday 20 August 2012

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):

mailhub=smtp.sendgrid.net
FromLineOverride=YES
AuthUser=[SENDGRID-EMAIL]
AuthPass=[SENDGRID-PASSWORD]
AuthMethod=LOGIN

4 comments:

  1. Here i have learn about drupal Ubuntu environment there we can learn more and more about drupal development.........

    ReplyDelete
  2. Drupal development is a best open source technology. Thanks for sharing for this article.
    drupal developer

    ReplyDelete
  3. Just a quick note to let you know that I liked what I read. Cheers!
    dot net application development

    ReplyDelete
  4. This is great post about Drupal Development. Drupal is world popular CMS. It is easy to used and easy to manage. Hire Dedicated Drupal web Expert for your Drupal development as per your need.

    ReplyDelete