Corrected indentation.

This commit is contained in:
Ryan C. Gordon 2017-04-06 01:49:34 -04:00
parent c51af13338
commit 888d1512ec
1 changed files with 3 additions and 3 deletions

View File

@ -74,11 +74,11 @@ class Admin::EmailController < Admin::AdminController
params.require(:to) params.require(:to)
# These strings aren't localized; they are sent to an anonymous SMTP user. # These strings aren't localized; they are sent to an anonymous SMTP user.
if !User.exists?(email: Email.downcase(params[:from])) && !SiteSetting.enable_staged_users if !User.exists?(email: Email.downcase(params[:from])) && !SiteSetting.enable_staged_users
render json: { reject: true, reason: "Mail from your address is not accepted. Do you have an account here?" } render json: { reject: true, reason: "Mail from your address is not accepted. Do you have an account here?" }
elsif Email::Receiver.check_address(Email.downcase(params[:to])).nil? elsif Email::Receiver.check_address(Email.downcase(params[:to])).nil?
render json: { reject: true, reason: "Mail to this address is not accepted. Check the address and try to send again?" } render json: { reject: true, reason: "Mail to this address is not accepted. Check the address and try to send again?" }
else else
render json: { reject: false } render json: { reject: false }
end end
end end