This repository has been archived on 2024-08-27. You can view files and clone it, but cannot push or open issues or pull requests.
redstoner.com/app/mailers/redstoner_mailer.rb
Jonas Folvik db1c10eb9b An Option to resend the confirmation mail
You should now be able to resend the confirmation mail with the click of
a link that is next to the warning that the mail isn't confirmed.

Resend the confirmation mail cleaning

Just a way to re use the files and stuff we already have instead of the
file I created even though I could use the register_mail we have.

Change of route and link to button

I changed the route from GET to POST because of security reasons, and
changed the link_to to a button_to

changed the notice

I changed the notice so it said check for the mail instead of check for
the link

Changed notice and button

Changed the notice to say "Check your inbox" instead of "Check your
mail" also changed the way the class looks
2016-06-17 10:21:49 +02:00

48 lines
1.4 KiB
Ruby

class RedstonerMailer < ActionMailer::Base
add_template_helper(ApplicationHelper)
default from: "info@redstoner.com"
default reply_to: "redstonerserver+website@gmail.com"
def register_mail(user, uses_mc_pass)
@user = user
@mcpw = uses_mc_pass
mail(to: @user.email, subject: "Registration on Redstoner.com")
end
def register_info_mail(user, uses_mc_pass)
@user = user
@mcpw = uses_mc_pass
mail(to: "redstonerserver@gmail.com", subject: "#{@user.name} registered on Redstoner")
end
def new_thread_mention_mail(user, thread)
@user = user
@thread = thread
mail(to: @user.email, subject: "#{thread.author.name} mentioned you in '#{thread.title}' on Redstoner")
end
def new_thread_reply_mail(user, reply)
@user = user
@reply = reply
mail(to: @user.email, subject: "#{reply.author.name} replied to '#{reply.thread.title}' on Redstoner")
end
def new_post_mention_mail(user, post)
@user = user
@post = post
mail(to: @user.email, subject: "#{post.author.name} mentioned you in '#{post.title}' on Redstoner")
end
def new_post_comment_mail(user, comment)
@user = user
@comment = comment
mail(to: @user.email, subject: "#{comment.author.name} replied to '#{comment.blogpost.title}' on Redstoner")
end
def email_change_confirm_mail(user)
@user = user
mail(to: @user.email, subject: "Email change on Redstoner.com")
end
end