Commit 8800475815f89bdadbc2d7d81fa10cbe7acf4f23
1 parent
32901bc2
Exists in
master
and in
1 other branch
Add capabilities to send email by sendmail
In the configuration file of Errbit you can now define a sendmail configuration and use it send all email by this sendmail fix #512
Showing
3 changed files
with
12 additions
and
0 deletions
Show diff stats
CHANGELOG.md
@@ -13,6 +13,8 @@ | @@ -13,6 +13,8 @@ | ||
13 | - [#524][] Add current user information on the notifer.js ([@roryf][]) | 13 | - [#524][] Add current user information on the notifer.js ([@roryf][]) |
14 | - [#523][] Update javascript-stacktrace ([@aliscott][]) | 14 | - [#523][] Update javascript-stacktrace ([@aliscott][]) |
15 | - [#516][] Add Jira Issue tracker ([@xenji][]) | 15 | - [#516][] Add Jira Issue tracker ([@xenji][]) |
16 | +- [#512][] Add capabilities to configure the use of sendmail to send | ||
17 | + email from Errbit ([@shingara][]) | ||
16 | 18 | ||
17 | ### Bug Fixes | 19 | ### Bug Fixes |
18 | 20 |
config/config.example.yml
@@ -102,3 +102,8 @@ github_access_scope: ['repo'] | @@ -102,3 +102,8 @@ github_access_scope: ['repo'] | ||
102 | # :user_name: USERNAME | 102 | # :user_name: USERNAME |
103 | # :password: PASSWORD | 103 | # :password: PASSWORD |
104 | 104 | ||
105 | + | ||
106 | +# If you want send your email by your sendmail | ||
107 | +# sendmail_settings: | ||
108 | +# :location: '/usr/sbin/sendmail' | ||
109 | +# :arguments: '-i -t' |
config/initializers/_load_config.rb
@@ -71,6 +71,11 @@ if smtp = Errbit::Config.smtp_settings | @@ -71,6 +71,11 @@ if smtp = Errbit::Config.smtp_settings | ||
71 | ActionMailer::Base.smtp_settings = smtp | 71 | ActionMailer::Base.smtp_settings = smtp |
72 | end | 72 | end |
73 | 73 | ||
74 | +if sendmail = Errbit::Config.sendmail_settings | ||
75 | + ActionMailer::Base.delivery_method = :sendmail | ||
76 | + ActionMailer::Base.sendmail_settings = sendmail | ||
77 | +end | ||
78 | + | ||
74 | # Set config specific values | 79 | # Set config specific values |
75 | (ActionMailer::Base.default_url_options ||= {}).tap do |default| | 80 | (ActionMailer::Base.default_url_options ||= {}).tap do |default| |
76 | default.merge! :host => Errbit::Config.host if default[:host].blank? | 81 | default.merge! :host => Errbit::Config.host if default[:host].blank? |