aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/request_mailer.rb
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-06-07 22:04:53 +0100
committerRobin Houston <robin.houston@gmail.com>2012-06-07 22:04:53 +0100
commit1ff635e834c004600faa445fc53e757996cde30d (patch)
tree9854dff8f88afbb9b7738703b44523d25dbae069 /app/models/request_mailer.rb
parent428438732a90aab880dde72d22151105b46d9908 (diff)
WIP API
Diffstat (limited to 'app/models/request_mailer.rb')
-rw-r--r--app/models/request_mailer.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb
index 8764b827b..f7cc088c1 100644
--- a/app/models/request_mailer.rb
+++ b/app/models/request_mailer.rb
@@ -28,6 +28,17 @@ class RequestMailer < ApplicationMailer
:filename => attachment_name
end
end
+
+ # Used when a response is uploaded using the API
+ def external_response(info_request, body, sent_at, attachments)
+ @from = blackhole_email
+ @recipients = info_request.incoming_name_and_email
+ @body = { :body => body }
+
+ attachments.each do |attachment_hash|
+ attachment attachment_hash
+ end
+ end
# Incoming message arrived for a request, but new responses have been stopped.
def stopped_responses(info_request, email, raw_email_data)