Sha256: 6fe506483efc3edba124e86863dcab353d6a06dc5c29e3ff577c5e6e857ed336
Contents?: true
Size: 773 Bytes
Versions: 11
Compression:
Stored size: 773 Bytes
Contents
module Spree module Admin class MailMethodsController < ResourceController after_filter :initialize_mail_settings def testmail @mail_method = Spree::MailMethod.find(params[:id]) if TestMailer.test_email(@mail_method, current_user).deliver flash.notice = t('admin.mail_methods.testmail.delivery_success') else flash[:error] = t('admin.mail_methods.testmail.delivery_error') end rescue Exception => e flash[:error] = t('admin.mail_methods.testmail.error') % {:e => e} ensure respond_with(@mail_method) { |format| format.html { redirect_to :back } } end private def initialize_mail_settings Spree::Core::MailSettings.init end end end end
Version data entries
11 entries across 11 versions & 1 rubygems