diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 3cbe5287f..57a5c7fad 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -213,7 +213,7 @@ class MessagesController < ApplicationController def notify_course_students message, course course.students.includes(:user).each do |student| - UserMailer.course_message_email(student&.user&.mail, message.id).deliver_now if student&.user&.mail + UserMailer.course_message_email(student&.user&.mail, message.id).deliver_later if student&.user&.mail end end end