app/controllers/contacts_controller.rb in tkh_content-0.1.9 vs app/controllers/contacts_controller.rb in tkh_content-0.1.9.1

- old
+ new

@@ -14,11 +14,11 @@ sent_email = send_message_to_admin(@contact) if saved && sent_email == 'success' redirect_to root_path, notice: "Your message has been sent. Thank you very much!" elsif saved && sent_email == 'exception' - flash[:error] = 'There was a problem sending this message' + flash[:error] = "There was a problem sending this message<br />#{e}" redirect_to :back elsif saved && sent_email == 'invalid' flash[:error] = 'There was a problem sending this message. Your email address does not seem to be valid!' redirect_to :back else @@ -40,10 +40,11 @@ # Actually send the email to the student begin ContactMailer.message_from_contact_form(contact).deliver return 'success' rescue Exception => e - # AdminMailer.rescued_exceptions(e, "Some exception occurred while trying to send a student his confirmation for registering in a course. The email was never sent!").deliver + AdminMailer.rescued_exceptions(e, "Some exception occurred while trying to send a student his confirmation for registering in a course. The email was never sent!").deliver + @exception = e return 'exception' end else # for invalid or blank emails return 'invalid' end