Sending e-mails with :sendmail in Rails 3


If you have a Linux Server and you want to send emails in your Rails Application using your own email server please check this. We are using ssmtp.

Put this in your environment.rb:

ActionMailer::Base.delivery_method = :sendmail
        ActionMailer::Base.sendmail_settings = {
          :location => "ssmtp",
          :arguments => "-i"

Common Mistakes

Errno::EPIPE: Broken pipe

Maybe cause you are using the argument “-t” rather than “-i”.

SSMTP is a simple and powerful way to send e-mails, mainly now in your rails application. = )


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s