mailer test

This commit is contained in:
jomo
2013-10-09 22:45:46 +02:00
parent 21e868524a
commit 978698beb2

View File

@@ -82,15 +82,15 @@ require 'open-uri'
minecraftpw = true minecraftpw = true
flash[:alert] = "Really? That's your Minecraft password!" flash[:alert] = "Really? That's your Minecraft password!"
end end
begin # begin
RedstonerMailer.register_mail(@user, minecraftpw).deliver RedstonerMailer.register_mail(@user, minecraftpw).deliver
RedstonerMailer.register_info_mail(@user, minecraftpw).deliver RedstonerMailer.register_info_mail(@user, minecraftpw).deliver
rescue # rescue
puts "---" # puts "---"
puts "WARNING: registration mail failed for user #{@user.name}, #{@user.email}" # puts "WARNING: registration mail failed for user #{@user.name}, #{@user.email}"
puts "---" # puts "---"
flash[:alert] = "Registration mail failed. Please contact us in-game." # flash[:alert] = "Registration mail failed. Please contact us in-game."
end # end
flash[:notice] = "Successfully signed up! Check your email!" flash[:notice] = "Successfully signed up! Check your email!"
redirect_to edit_user_path(@user) redirect_to edit_user_path(@user)
else else