mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Story #109367018 - warn if email missing, and format pending email
This commit is contained in:
parent
504c4454c5
commit
496bb8738d
1 changed files with 4 additions and 4 deletions
|
@ -97,7 +97,7 @@ class DomainMailModel
|
||||||
end
|
end
|
||||||
|
|
||||||
def registrant_pending
|
def registrant_pending
|
||||||
@params[:recipient] = @domain.pending_json['new_registrant_email']
|
@params[:recipient] = format @domain.pending_json['new_registrant_email']
|
||||||
@params[:new_registrant_name] = @domain.pending_json['new_registrant_name']
|
@params[:new_registrant_name] = @domain.pending_json['new_registrant_name']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -109,6 +109,7 @@ class DomainMailModel
|
||||||
|
|
||||||
# puny internet domain name, TODO: username<email>
|
# puny internet domain name, TODO: username<email>
|
||||||
def format(email)
|
def format(email)
|
||||||
|
return warn_no_email if email.nil?
|
||||||
user, host = email.split('@')
|
user, host = email.split('@')
|
||||||
host = SimpleIDN.to_ascii(host)
|
host = SimpleIDN.to_ascii(host)
|
||||||
"#{user}@#{host}"
|
"#{user}@#{host}"
|
||||||
|
@ -154,9 +155,8 @@ class DomainMailModel
|
||||||
@params
|
@params
|
||||||
end
|
end
|
||||||
|
|
||||||
def warn_no_email(item)
|
def warn_no_email(item = 'email')
|
||||||
#reason = "#{item.to_s} for #{@domain.name}"
|
warn_missing item
|
||||||
warn_not_delivered item #reason
|
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue