2022-10-14 11:59:48 +08:00
|
|
|
class UserMailer < ApplicationMailer
|
|
|
|
# 注意:这个地方一定要和你的邮箱服务域名一致
|
|
|
|
# default from: 'notification@trustie.org'
|
2022-11-11 15:57:15 +08:00
|
|
|
# default from: 'noreply@gitlink.org.cn'
|
|
|
|
default from: 'GitLink <noreply@gitlink.org.cn>'
|
2022-10-14 11:59:48 +08:00
|
|
|
|
|
|
|
# 用户注册验证码
|
|
|
|
def register_email(mail, code)
|
|
|
|
@code = code
|
|
|
|
mail(to: mail, subject: 'Gitink | 注册验证码')
|
|
|
|
end
|
|
|
|
|
2022-11-15 14:31:18 +08:00
|
|
|
# 用户找回密码
|
|
|
|
def find_password(mail, code)
|
|
|
|
@code = code
|
|
|
|
mail(to: mail, subject: 'Gitink | 找回密码验证码')
|
|
|
|
end
|
|
|
|
|
|
|
|
# 用户绑定邮箱
|
|
|
|
def bind_email(mail, code)
|
|
|
|
@code = code
|
|
|
|
mail(to: mail, subject: 'Gitink | 绑定邮箱验证码')
|
|
|
|
end
|
|
|
|
|
2022-10-14 11:59:48 +08:00
|
|
|
def update_email(mail, code)
|
|
|
|
@code = code
|
|
|
|
mail(to: mail, subject: 'Gitink | 更改邮箱验证码')
|
|
|
|
end
|
2022-11-09 14:37:27 +08:00
|
|
|
|
|
|
|
def feedback_email(mail, title, content)
|
|
|
|
mail(to: mail, subject: title, content_type: "text/html", body: content)
|
|
|
|
end
|
2022-10-14 11:59:48 +08:00
|
|
|
end
|