diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-12-03 17:40:58 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-12-03 17:40:58 +0000 |
commit | bfb3fe634d8719336a40f1105d322ae2e9c2d0ad (patch) | |
tree | ea42a8b49d2b203c6f8f65f65dcb81019c700d54 /app/models/info_request.rb | |
parent | 8cff1514903f9dde107532e6a57f6e36e4533920 (diff) |
Delegate getting the from address of an incoming mail to the mail handler.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 0a06b84a2..3355b9443 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -434,11 +434,11 @@ public elsif self.allow_new_responses_from == 'anybody' allow = true elsif self.allow_new_responses_from == 'authority_only' - if email.from_addrs.nil? || email.from_addrs.size == 0 + sender_email = MailHandler.get_from_address(email) + if sender_email.nil? allow = false reason = _('Only the authority can reply to this request, but there is no "From" address to check against') else - sender_email = email.from_addrs[0].spec sender_domain = PublicBody.extract_domain_from_email(sender_email) reason = _("Only the authority can reply to this request, and I don't recognise the address this reply was sent from") allow = false |