From 8800475815f89bdadbc2d7d81fa10cbe7acf4f23 Mon Sep 17 00:00:00 2001 From: Cyril Mougel Date: Wed, 31 Jul 2013 13:33:06 +0200 Subject: [PATCH] Add capabilities to send email by sendmail --- CHANGELOG.md | 2 ++ config/config.example.yml | 5 +++++ config/initializers/_load_config.rb | 5 +++++ 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5abe7d2..f01bb8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ - [#524][] Add current user information on the notifer.js ([@roryf][]) - [#523][] Update javascript-stacktrace ([@aliscott][]) - [#516][] Add Jira Issue tracker ([@xenji][]) +- [#512][] Add capabilities to configure the use of sendmail to send + email from Errbit ([@shingara][]) ### Bug Fixes diff --git a/config/config.example.yml b/config/config.example.yml index edc72d0..f53c8ce 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -102,3 +102,8 @@ github_access_scope: ['repo'] # :user_name: USERNAME # :password: PASSWORD + +# If you want send your email by your sendmail +# sendmail_settings: +# :location: '/usr/sbin/sendmail' +# :arguments: '-i -t' diff --git a/config/initializers/_load_config.rb b/config/initializers/_load_config.rb index 64f8396..34fb360 100644 --- a/config/initializers/_load_config.rb +++ b/config/initializers/_load_config.rb @@ -71,6 +71,11 @@ if smtp = Errbit::Config.smtp_settings ActionMailer::Base.smtp_settings = smtp end +if sendmail = Errbit::Config.sendmail_settings + ActionMailer::Base.delivery_method = :sendmail + ActionMailer::Base.sendmail_settings = sendmail +end + # Set config specific values (ActionMailer::Base.default_url_options ||= {}).tap do |default| default.merge! :host => Errbit::Config.host if default[:host].blank? -- libgit2 0.21.2