diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index fe7f454c..f6e4f7fb 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -49,7 +49,7 @@ class CommentsController < ApplicationController @comment = Comment.new(comment_params_without_request_id) if comment_params[:request_id] - UserMailer.got_new_comment(@comment, RequestForComment.find(comment_params[:request_id]), current_user) + UserMailer.got_new_comment(@comment, RequestForComment.find(comment_params[:request_id]), current_user).deliver_now end respond_to do |format| diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index e1773d48..5b1a04fe 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -18,6 +18,6 @@ class UserMailer < ActionMailer::Base @commenting_user_displayname = commenting_user.displayname @comment_text = comment.text @rfc_link = request_for_comment_url(request_for_comment) - mail(subject: t('mailers.user_mailer.got_new_comment.subject', commenting_user_displayname: @commenting_user_displayname), to: request_for_comment.user.email).deliver + mail(subject: t('mailers.user_mailer.got_new_comment.subject', commenting_user_displayname: @commenting_user_displayname), to: request_for_comment.user.email) end end