mirror of
https://github.com/moparisthebest/mailcatcher
synced 2025-03-11 06:50:12 -04:00
parent
d3f083f8df
commit
aa9b8c925a
@ -70,6 +70,7 @@ module MailCatcher
|
||||
end
|
||||
end)
|
||||
else
|
||||
content_type :json
|
||||
Mail.messages.to_json
|
||||
end
|
||||
end
|
||||
@ -82,6 +83,7 @@ module MailCatcher
|
||||
get "/messages/:id.json" do
|
||||
id = params[:id].to_i
|
||||
if message = Mail.message(id)
|
||||
content_type :json
|
||||
message.merge({
|
||||
"formats" => [
|
||||
"source",
|
||||
@ -107,6 +109,7 @@ module MailCatcher
|
||||
# Rewrite body to link to embedded attachments served by cid
|
||||
body.gsub! /cid:([^'"> ]+)/, "#{id}/parts/\\1"
|
||||
|
||||
content_type :html
|
||||
body
|
||||
else
|
||||
not_found
|
||||
|
Loading…
x
Reference in New Issue
Block a user