diff --git a/app/assets/javascripts/admin/templates/modal/admin_incoming_email.hbs b/app/assets/javascripts/admin/templates/modal/admin_incoming_email.hbs index 6ba2b006f..87f63b3a2 100644 --- a/app/assets/javascripts/admin/templates/modal/admin_incoming_email.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin_incoming_email.hbs @@ -10,78 +10,13 @@
-{{#if model.return_path}} -
- -
- {{model.return_path}} -
-
-{{/if}} -
- +
- {{model.message_id}} + {{textarea value=model.headers wrap="off"}}
-{{#if model.references}} -
- -
- -
-
-{{/if}} - -{{#if model.in_reply_to}} -
- -
- {{model.in_reply_to}} -
-
-{{/if}} - -
- -
- {{date}} -
-
- -
- -
- {{model.from}} -
-
- -
- -
- -
-
- -{{#if model.cc}} -
- -
- {{model.cc}} -
-
-{{/if}} -
diff --git a/app/serializers/incoming_email_details_serializer.rb b/app/serializers/incoming_email_details_serializer.rb index 0d8b83477..2ca27de78 100644 --- a/app/serializers/incoming_email_details_serializer.rb +++ b/app/serializers/incoming_email_details_serializer.rb @@ -3,14 +3,7 @@ class IncomingEmailDetailsSerializer < ApplicationSerializer attributes :error, :error_description, :rejection_message, - :return_path, - :date, - :from, - :to, - :cc, - :message_id, - :references, - :in_reply_to, + :headers, :subject, :body @@ -35,38 +28,8 @@ class IncomingEmailDetailsSerializer < ApplicationSerializer @error_string[EMAIL_RECEIVER_ERROR_PREFIX] end - def return_path - @mail.return_path - end - - def date - @mail.date - end - - def from - @mail.from.first.downcase - end - - def to - @mail.to.map(&:downcase) - end - - def cc - @mail.cc.map(&:downcase) if @mail.cc.present? - end - - def message_id - @mail.message_id - end - - def references - references = Email::Receiver.extract_references(@mail.references) - references.delete(@mail.in_reply_to) if references - references - end - - def in_reply_to - @mail.in_reply_to + def headers + @mail.header.to_s end def subject diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index ef82c0150..f3c5ca3f2 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2318,14 +2318,7 @@ en: modal: title: "Incoming Email Details" error: "Error" - return_path: "Return-Path" - message_id: "Message-Id" - in_reply_to: "In-Reply-To" - references: "References" - date: "Date" - from: "From" - to: "To" - cc: "Cc" + headers: "Headers" subject: "Subject" body: "Body" rejection_message: "Rejection Mail"