spree-contrib / spree_mail_settings

Mail setting functionality extracted from Spree.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
28 stars 152 forks source link

Custom auth settings override #17

Closed pseudo-su closed 9 years ago

pseudo-su commented 9 years ago

I have spee using custom authentication with devise pretty much the same as this: https://guides.spreecommerce.com/developer/authentication.html

Currently I have spree_mail_settings working for the settings of all of spree's emails but It doesn't seem to work for email outside of spree eg. user confirmation emails from devise

Is there a way I can override the devise mail settings to be the same as selected in spree_mail_settings admin?

pseudo-su commented 9 years ago

After a bit of digging i've determined that the problem is only with the sender address not being used, all the other settings seem to be fine. For anyone looking into this the closest i've got to a solution is to set

config.mailer_sender = Spree::Store.current.mail_from_address

in the devise.rb initializer but it does require a restart of the server for the changes made in the spee_mail_settings to take effect