diff --git a/app/controllers/feedback_controller.rb b/app/controllers/feedback_controller.rb index 14c22849..73ed9d9f 100644 --- a/app/controllers/feedback_controller.rb +++ b/app/controllers/feedback_controller.rb @@ -5,7 +5,7 @@ class FeedbackController < ApplicationController def create if params[:message].present? - Mailer.feedback(current_user, params[:message]).deliver + Mailer.feedback(current_user, params[:message]).deliver_now redirect_to root_url, notice: t('feedback.create.notice') else render :action => 'new' diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb index 553e4398..33e3e3ac 100644 --- a/app/controllers/invites_controller.rb +++ b/app/controllers/invites_controller.rb @@ -10,7 +10,7 @@ class InvitesController < ApplicationController authenticate_membership_or_admin params[:invite][:group_id] @invite = Invite.new(params[:invite]) if @invite.save - Mailer.invite(@invite).deliver + Mailer.invite(@invite).deliver_now respond_to do |format| format.html do diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb index 43ca5fdf..44fc8319 100644 --- a/app/controllers/login_controller.rb +++ b/app/controllers/login_controller.rb @@ -18,7 +18,7 @@ class LoginController < ApplicationController user.reset_password_token = user.new_random_password(16) user.reset_password_expires = Time.now.advance(:days => 2) if user.save - Mailer.reset_password(user).deliver + Mailer.reset_password(user).deliver_now logger.debug("Sent password reset email to #{user.email}.") end end diff --git a/lib/tasks/foodsoft.rake b/lib/tasks/foodsoft.rake index ceb62529..00e741df 100644 --- a/lib/tasks/foodsoft.rake +++ b/lib/tasks/foodsoft.rake @@ -8,7 +8,7 @@ namespace :foodsoft do rake_say "Send notifications for #{task.name} to .." for user in task.users begin - Mailer.upcoming_tasks(user, task).deliver if user.settings.notify['upcoming_tasks'] == 1 + Mailer.upcoming_tasks(user, task).deliver_now if user.settings.notify['upcoming_tasks'] == 1 rescue rake_say "deliver aborted for #{user.email}.." end @@ -25,7 +25,7 @@ namespace :foodsoft do for user in workgroup.users if user.settings.messages['send_as_email'] == "1" && !user.email.blank? begin - Mailer.not_enough_users_assigned(task, user).deliver + Mailer.not_enough_users_assigned(task, user).deliver_now rescue rake_say "deliver aborted for #{user.email}" end