邮件的异步发送

issues25489
cxt 5 years ago
parent a21cb8e165
commit b3b901b7b5

@ -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

Loading…
Cancel
Save