mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 13:45:44 +08:00
FIX 完善邮箱注册发送邮件功能
This commit is contained in:
@@ -1,17 +1,10 @@
|
||||
class UserMailer < ApplicationMailer
|
||||
# 注意:这个地方一定要和你的邮箱服务域名一致
|
||||
default from: 'educoder@trustie.org'
|
||||
default from: 'notification@gitlink.org.cn'
|
||||
|
||||
# 用户注册验证码
|
||||
def register_email(mail, code)
|
||||
@code = code
|
||||
mail(to: mail, subject: '验证你的电子邮件')
|
||||
end
|
||||
|
||||
# 课堂讨论区的邮件通知
|
||||
def course_message_email(mail, message_id)
|
||||
@message = Message.find_by(id: message_id)
|
||||
@course = @message&.board&.course
|
||||
mail(to: mail, subject: '课堂发布了新的帖子') if @message.present? && @course.present?
|
||||
mail(to: mail, subject: 'GitLink | 注册确实开源邮箱验证')
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user