Skip to content
This repository has been archived by the owner on Nov 28, 2021. It is now read-only.

Configuration is ignored, mail is sent with default ActionMailer settings #26

Closed
mg-partec opened this issue Mar 9, 2016 · 2 comments
Closed

Comments

@mg-partec
Copy link

Hello,

I have just updated my app bundle including the last version of 3.0 stable branch of spree_mail_settings.
It seems like ActionMailer is now trying to send emails with the default setting (localhost:25), no matter what is set in the config page.

Any suggestions?

This is my gemfile.lock:

GIT
remote: git://github.com/spree-contrib/better_spree_paypal_express.git
revision: 526d7f4f5bb9074b41b8d6ff38c47d01612ededf
branch: 3-0-stable
specs:
spree_paypal_express (3.0.0)
paypal-sdk-merchant (= 1.106.1)
spree_core (~> 3.0.0)

GIT
remote: git://github.com/spree-contrib/spree_editor.git
revision: 00c3db2d06f659e4bb7e600c62ef14e3c7158263
branch: 3-0-stable
specs:
spree_editor (3.0.5)
ckeditor (> 4.1.2)
spree_backend (
> 3.0.0)
tinymce-rails (~> 4.1.10)

GIT
remote: git://github.com/spree-contrib/spree_i18n.git
revision: 29c6a015dddcd78408d1ef4ac8f7f77bd0fc4335
branch: 3-0-stable
specs:
spree_i18n (3.0.5)
friendly_id-globalize
globalize (> 5.0.1)
i18n_data (
> 0.7.0)
kaminari-i18n (> 0.3.2)
rails-i18n (
> 4.0.1)
spree_core (~> 3.0.5)

GIT
remote: git://github.com/spree-contrib/spree_mail_settings.git
revision: d17f10b
branch: 3-0-stable
specs:
spree_mail_settings (3.0.0)
spree_backend (~> 3.0.0)

GIT
remote: git://github.com/spree-contrib/spree_print_invoice.git
revision: d59b21a8e4b5c2f57385074c9a49bfeb2498f4f0
branch: 3-0-stable
specs:
spree_print_invoice (3.0.0.beta)
prawn (> 1.0.0)
spree_core (
> 3.0.0)

GIT
remote: git://github.com/spree-contrib/spree_related_products.git
revision: 0fdb345315be15c66a706e419e5d153ff07850b3
branch: 3-0-stable
specs:
spree_related_products (3.2.0)
spree_backend (~> 3.0.0)

GIT
remote: git://github.com/spree-contrib/spree_static_content.git
revision: 80a74e1ad8e1843c6bfabcd700dc8edb84822fdd
branch: 3-0-stable
specs:
spree_static_content (3.0.1)
spree_core (~> 3.0.0)

GIT
remote: git://github.com/spree/spree.git
revision: 62f67c5e810c2d1cbdec6462718216661c08db43
branch: 3-0-stable
specs:
spree (3.0.7)
spree_api (= 3.0.7)
spree_backend (= 3.0.7)
spree_cmd (= 3.0.7)
spree_core (= 3.0.7)
spree_frontend (= 3.0.7)
spree_sample (= 3.0.7)
spree_api (3.0.7)
rabl (> 0.11.6)
spree_core (= 3.0.7)
versioncake (
> 2.3.1)
spree_backend (3.0.7)
bootstrap-sass (> 3.3)
jquery-rails (
> 4.1)
jquery-ui-rails (> 5.0)
select2-rails (= 3.5.9.1)
spree_api (= 3.0.7)
spree_core (= 3.0.7)
spree_cmd (3.0.7)
thor (
> 0.14)
spree_core (3.0.7)
activemerchant (> 1.47.0)
acts_as_list (
> 0.6)
awesome_nested_set (> 3.0.1)
cancancan (
> 1.10.1)
carmen (> 1.0.0)
deface (
> 1.0.0)
ffaker (> 1.16)
font-awesome-rails (
> 4.0)
friendly_id (> 5.1.0)
highline (
> 1.6.18)
json (> 1.7)
kaminari (
> 0.15, >= 0.15.1)
monetize (> 1.1)
paperclip (
> 4.2.0)
paranoia (> 2.1.0)
premailer-rails
rails (
> 4.2.2)
ransack (> 1.4.1)
responders
sprockets-rails (
> 2.0)
state_machines-activerecord (> 0.2)
stringex
truncate_html (= 0.9.2)
twitter_cldr (
> 3.0)
spree_frontend (3.0.7)
bootstrap-sass (>= 3.3.5.1, < 3.4)
canonical-rails (> 0.0.4)
jquery-rails (
> 4.1)
spree_api (= 3.0.7)
spree_core (= 3.0.7)
spree_sample (3.0.7)
spree_core (= 3.0.7)

GIT
remote: git://github.com/spree/spree_auth_devise.git
revision: 4d1328c93fc5fcbfcb95eb0bd68057b1e8768bbb
branch: 3-0-stable
specs:
spree_auth_devise (3.0.5)
devise (> 3.4.1)
devise-encryptable (= 0.1.2)
json
multi_json
spree_core (
> 3.0.0)

GIT
remote: git://github.com/spree/spree_gateway.git
revision: 59ac5bcacf948cbd194814db906e7546c3d9852c
branch: 3-0-stable
specs:
spree_gateway (3.0.0)
spree_core (~> 3.0.0)

GEM
remote: https://rubygems.org/
remote: https://rails-assets.org/
specs:
actionmailer (4.2.5)
actionpack (= 4.2.5)
actionview (= 4.2.5)
activejob (= 4.2.5)
mail (> 2.5, >= 2.5.4)
rails-dom-testing (
> 1.0, >= 1.0.5)
actionpack (4.2.5)
actionview (= 4.2.5)
activesupport (= 4.2.5)
rack (> 1.6)
rack-test (
> 0.6.2)
rails-dom-testing (> 1.0, >= 1.0.5)
rails-html-sanitizer (
> 1.0, >= 1.0.2)
actionview (4.2.5)
activesupport (= 4.2.5)
builder (> 3.1)
erubis (
> 2.7.0)
rails-dom-testing (> 1.0, >= 1.0.5)
rails-html-sanitizer (
> 1.0, >= 1.0.2)
activejob (4.2.5)
activesupport (= 4.2.5)
globalid (>= 0.3.0)
activemerchant (1.47.0)
activesupport (>= 3.2.14, < 5.0.0)
builder (>= 2.1.2, < 4.0.0)
i18n (>= 0.6.9)
nokogiri (> 1.4)
activemodel (4.2.5)
activesupport (= 4.2.5)
builder (
> 3.1)
activerecord (4.2.5)
activemodel (= 4.2.5)
activesupport (= 4.2.5)
arel (> 6.0)
activesupport (4.2.5)
i18n (
> 0.7)
json (> 1.7, >= 1.7.7)
minitest (
> 5.1)
thread_safe (> 0.3, >= 0.3.4)
tzinfo (
> 1.1)
acts_as_list (0.7.2)
activerecord (>= 3.0)
addressable (2.4.0)
arel (6.0.3)
autoprefixer-rails (6.3.3.1)
execjs
awesome_nested_set (3.0.3)
activerecord (>= 4.0.0, < 5)
axlsx (2.0.1)
htmlentities (> 4.3.1)
nokogiri (>= 1.4.1)
rubyzip (
> 1.0.0)
bcrypt (3.1.11)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.6)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
builder (3.2.2)
byebug (8.2.2)
camertron-eprun (1.1.0)
cancancan (1.10.1)
canonical-rails (0.0.11)
rails (>= 3.1, < 5.0)
capistrano (3.4.0)
i18n
rake (>= 10.0.0)
sshkit (> 1.3)
capistrano-bundler (1.1.4)
capistrano (
> 3.1)
sshkit (> 1.2)
capistrano-rails (1.1.6)
capistrano (
> 3.1)
capistrano-bundler (> 1.1)
capistrano-rbenv (2.0.4)
capistrano (
> 3.1)
sshkit (> 1.3)
capistrano3-unicorn (0.2.1)
capistrano (
> 3.1, >= 3.1.0)
carmen (1.0.2)
activesupport (>= 3.0.0)
ckeditor (4.1.6)
cocaine
orm_adapter (> 0.5.0)
cldr-plurals-runtime-rb (1.0.1)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
colorize (0.7.7)
concurrent-ruby (1.0.1)
css_parser (1.3.7)
addressable
debug_inspector (0.0.2)
deface (1.0.2)
colorize (>= 0.5.8)
nokogiri (
> 1.6.0)
polyglot
rails (>= 3.1)
devise (3.4.1)
bcrypt (> 3.0)
orm_adapter (
> 0.1)
railties (>= 3.2.6, < 5)
responders
thread_safe (> 0.1)
warden (
> 1.2.3)
devise-encryptable (0.1.2)
devise (>= 2.1.0)
erubis (2.7.0)
exception_notification (4.1.4)
actionmailer (> 4.0)
activesupport (
> 4.0)
execjs (2.6.0)
ffaker (1.32.1)
font-awesome-rails (4.5.0.1)
railties (>= 3.2, < 5.1)
friendly_id (5.1.0)
activerecord (>= 4.0.0)
friendly_id-globalize (1.0.0.alpha2)
friendly_id (> 5.1.0, < 6.0)
globalid (0.3.6)
activesupport (>= 4.1.0)
globalize (5.0.1)
activemodel (>= 4.2.0, < 4.3)
activerecord (>= 4.2.0, < 4.3)
highline (1.6.21)
htmlentities (4.3.4)
i18n (0.7.0)
i18n_data (0.7.0)
jbuilder (2.4.1)
activesupport (>= 3.0.0, < 5.1)
multi_json (
> 1.2)
jquery-rails (4.1.0)
rails-dom-testing (> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5)
railties (>= 3.2.16)
json (1.8.3)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kaminari-i18n (0.3.2)
kaminari
rails
kgio (2.10.0)
libv8 (3.16.14.13)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.99.1)
mini_portile2 (2.0.0)
minitest (5.8.4)
monetize (1.4.0)
money (
> 6.7)
money (6.7.0)
i18n (>= 0.6.4, <= 0.7.0)
sixarm_ruby_unaccent (>= 1.1.1, < 2)
multi_json (1.11.2)
mysql2 (0.3.20)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.0.2)
nokogiri (1.6.7.2)
mini_portile2 (> 2.0.0.rc2)
orm_adapter (0.5.0)
paperclip (4.2.4)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
cocaine (
> 0.5.5)
mime-types
paranoia (2.1.5)
activerecord (> 4.0)
paypal-sdk-core (0.2.10)
multi_json (
> 1.0)
xml-simple
paypal-sdk-merchant (1.106.1)
paypal-sdk-core (> 0.2.3)
pdf-core (0.2.5)
polyamorous (1.3.0)
activerecord (>= 3.0)
polyglot (0.3.5)
prawn (1.0.0)
pdf-core (
> 0.2.2)
ttfunk (> 1.1.1)
premailer (1.8.6)
css_parser (>= 1.3.6)
htmlentities (>= 4.0.0)
premailer-rails (1.9.0)
actionmailer (>= 3, < 5)
premailer (
> 1.7, >= 1.7.9)
rabl (0.11.8)
activesupport (>= 2.3.14)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.5)
actionmailer (= 4.2.5)
actionpack (= 4.2.5)
actionview (= 4.2.5)
activejob (= 4.2.5)
activemodel (= 4.2.5)
activerecord (= 4.2.5)
activesupport (= 4.2.5)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.5)
sprockets-rails
rails-assets-datetimepicker (2.5.1)
rails-assets-jquery (>= 1.7.2)
rails-assets-jquery-mousewheel (>= 3.1.13)
rails-assets-php-date-formatter (>= 1.3.3)
rails-assets-jquery (2.2.1)
rails-assets-jquery-mousewheel (3.1.13)
rails-assets-jquery (>= 1.2.2)
rails-assets-php-date-formatter (1.3.3)
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (
> 2.0)
rails-i18n (4.0.8)
i18n (> 0.7)
railties (
> 4.0)
railties (4.2.5)
actionpack (= 4.2.5)
activesupport (= 4.2.5)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.16.0)
rake (11.0.1)
ransack (1.4.1)
actionpack (>= 3.0)
activerecord (>= 3.0)
activesupport (>= 3.0)
i18n
polyamorous (> 1.1)
rdoc (4.2.2)
json (
> 1.4)
ref (2.0.0)
responders (2.1.1)
railties (>= 4.2.0, < 5.1)
rubyzip (1.0.0)
sass (3.4.21)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.4.1)
json (
> 1.7, >= 1.7.7)
rdoc (> 4.0)
select2-rails (3.5.9.1)
thor (
> 0.14)
sixarm_ruby_unaccent (1.1.1)
spring (1.6.4)
sprockets (3.5.2)
concurrent-ruby (> 1.0)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.11)
sshkit (1.8.1)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
state_machines (0.4.0)
state_machines-activemodel (0.3.0)
activemodel (
> 4.1)
state_machines (>= 0.4.0)
state_machines-activerecord (0.3.0)
activerecord (> 4.1)
state_machines-activemodel (>= 0.3.0)
stringex (2.6.0)
therubyracer (0.12.2)
libv8 (
> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.2)
tinymce-rails (4.1.10)
railties (>= 3.1.1)
truncate_html (0.9.2)
ttfunk (1.1.1)
turbolinks (2.5.3)
coffee-rails
twitter_cldr (3.2.1)
camertron-eprun
cldr-plurals-runtime-rb (> 1.0.0)
json
tzinfo
tzinfo (1.2.2)
thread_safe (
> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
unicorn (4.9.0)
kgio (> 2.6)
rack
raindrops (
> 0.7)
versioncake (2.3.1)
actionpack (>= 3.2)
activesupport (>= 3.2)
railties (>= 3.2)
tzinfo
warden (1.2.6)
rack (>= 1.0)
web-console (2.3.0)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
xml-simple (1.1.5)

PLATFORMS
ruby

DEPENDENCIES
axlsx
byebug
capistrano (> 3.4.0)
capistrano-bundler (
> 1.1.4)
capistrano-rails (> 1.1.3)
capistrano-rbenv (
> 2.0.3)
capistrano3-unicorn (> 0.2.1)
coffee-rails (
> 4.1.0)
exception_notification
jbuilder (> 2.0)
jquery-rails
mysql2 (
> 0.3.20)
rails (= 4.2.5)
rails-assets-datetimepicker!
sass-rails (> 5.0)
sdoc (
> 0.4.0)
spree!
spree_auth_devise!
spree_editor!
spree_gateway!
spree_i18n!
spree_mail_settings!
spree_paypal_express!
spree_print_invoice!
spree_related_products!
spree_static_content!
spring
sqlite3
therubyracer
turbolinks
uglifier (>= 1.3.0)
unicorn (> 4.9.0)
web-console (
> 2.0)

BUNDLED WITH
1.11.2

@ayb
Copy link

ayb commented Mar 9, 2016

+1 I'm running into the same issue

I have Mailgun configured as an external SMTP and when I click "send test e-mail" it says:
Test Mail error: Connection refused - connect(2) for "localhost" port 25

Getting the same error at completion of checkout, basically unable to send e-mails as Spree is not using the config provided via this gem

@ayb
Copy link

ayb commented Mar 9, 2016

I'm just taking a look at the code now but seems to me that instead of just using the default Spree mailer (such as Spree::TestMailer) it will be necessary to override the class (via a decorator?) and use the SMTP parameters provided via the settings.

Similar to this example from the Rails docs:

class UserMailer < ApplicationMailer
def welcome_email(user, company)
@user = user
@url = user_url(@user)
delivery_options = { user_name: company.smtp_user,
password: company.smtp_password,
address: company.smtp_host }
mail(to: @user.email,
subject: "Please see the Terms and Conditions attached",
delivery_method_options: delivery_options)
end
end

http://guides.rubyonrails.org/action_mailer_basics.html (Section 2.8)

priyank-gupta pushed a commit to priyank-gupta/spree_mail_settings that referenced this issue Mar 10, 2016
priyank-gupta pushed a commit to priyank-gupta/spree_mail_settings that referenced this issue Mar 10, 2016
priyank-gupta pushed a commit to priyank-gupta/spree_mail_settings that referenced this issue Mar 10, 2016
@Mafi88 Mafi88 closed this as completed in dcbd60f Mar 10, 2016
Mafi88 added a commit that referenced this issue Mar 10, 2016
fix #26, add preferred delivery method in mail settings
Mafi88 added a commit that referenced this issue Mar 10, 2016
fix #26, add preferred delivery method in mail settings
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants