Merge 9bbf560651 into aeab38aff1
This commit is contained in:
commit
7174e53d7b
@ -117,10 +117,9 @@ class Admin::EmailController < Admin::AdminController
|
||||
end
|
||||
|
||||
def smtp_should_reject
|
||||
params.require(:from)
|
||||
params.require(:to)
|
||||
# These strings aren't localized; they are sent to an anonymous SMTP user.
|
||||
if !User.with_email(Email.downcase(params[:from])).exists? && !SiteSetting.enable_staged_users
|
||||
if params[:from].present? && !User.with_email(Email.downcase(params[:from])).exists? && !SiteSetting.enable_staged_users
|
||||
render json: {
|
||||
reject: true,
|
||||
reason: "Mail from your address is not accepted. Do you have an account here?",
|
||||
|
||||
Reference in New Issue
Block a user