Quantcast
Channel: 42 » development
Viewing all articles
Browse latest Browse all 3

Using Postfix to send out emails from development environment in Rails

$
0
0
Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

You want to be able to send emails from your development enironment using Postfix in your (K)Ubuntu pc.

Solution

First you would need to install postfix:

sudo apt-get install postfix

and then you would need to change an option in postfix to not use tls, so change /etc/postfix/main.cf:

sudo vi /etc/postfix/main.cf

and change the smtpd_use_tls from yes to no:

smtpd_use_tls=no

restart your postfix server:

sudo /usr/sbin/postfix reload

and then setup your config/development.rb as follows:

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  address:                 "127.0.0.1",
  port:                    25,
  enable_starttls_auto:    false
}

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images