cc & bcc adresses handle fix
This commit is contained in:
parent
11cd31cdee
commit
3ddedca1d3
|
@ -1,5 +1,7 @@
|
|||
## Changes
|
||||
|
||||
* handle Cc & Bcc adresses fix
|
||||
|
||||
#### 0.9.2
|
||||
|
||||
* fixes in handling draft folder
|
||||
|
|
|
@ -95,6 +95,7 @@ class MessagesController < ApplicationController
|
|||
imap_message = @mailbox.fetch_body(@message.uid)
|
||||
|
||||
mail = Mail.new(imap_message)
|
||||
@mail = Mail.new(imap_message)
|
||||
@plain_header = mail.header.to_s
|
||||
|
||||
|
||||
|
@ -103,8 +104,8 @@ class MessagesController < ApplicationController
|
|||
#@to = mail.To.addrs.presence
|
||||
@from = @message.from_addr
|
||||
@to = @message.to_addr
|
||||
@cc = mail.cc
|
||||
@bcc = mail.bcc
|
||||
#@cc = mail.cc
|
||||
#@bcc = mail.bcc
|
||||
#@subject = mail.Subject
|
||||
@date = mail.date.presence
|
||||
|
||||
|
|
|
@ -1,37 +1,38 @@
|
|||
%table{:class=>"header bottom-pix18"}
|
||||
%tbody
|
||||
%tr
|
||||
%td{:class=>"field_name"}
|
||||
= humanize_attr(@message,'from_addr') + ':'
|
||||
%td
|
||||
= address_formatter(@from,:show)
|
||||
%tr
|
||||
%td{:class=>"field_name"}
|
||||
= humanize_attr(@message,'to_addr') + ':'
|
||||
%td
|
||||
= address_formatter(@to,:show)
|
||||
- if not @cc.nil?
|
||||
%div{:class=>"well",:style=>"padding: 7px 5pt;"}
|
||||
%table{:class=>"header"}
|
||||
%tbody
|
||||
%tr
|
||||
%td{:class=>"field_name"}
|
||||
= humanize_attr(@message,'cc_addr') + ':'
|
||||
= humanize_attr(@message,'from_addr') + ':'
|
||||
%td
|
||||
= address_formatter(@cc,:show)
|
||||
- if not @bcc.nil?
|
||||
= address_formatter(@from,:show)
|
||||
%tr
|
||||
%td{:class=>"field_name"}
|
||||
= humanize_attr(@message,'bcc_addr') + ':'
|
||||
= humanize_attr(@message,'to_addr') + ':'
|
||||
%td
|
||||
= address_formatter(@bcc,:show)
|
||||
%tr
|
||||
%td{:class=>"field_name"}
|
||||
= humanize_attr(@message,'subject') + ':'
|
||||
%td
|
||||
= subject_formatter(@message,:show)
|
||||
%tr
|
||||
%td{:class=>"field_name"}
|
||||
= humanize_attr(@message,'date') + ':'
|
||||
%td
|
||||
= date_formatter(@date)
|
||||
= address_formatter(@to,:show)
|
||||
- if not @mail.cc.nil?
|
||||
%tr
|
||||
%td{:class=>"field_name"}
|
||||
= humanize_attr(@message,'cc_addr') + ':'
|
||||
%td
|
||||
= address_formatter(@mail.Cc.to_s,:show)
|
||||
- if not @mail.bcc.nil?
|
||||
%tr
|
||||
%td{:class=>"field_name"}
|
||||
= humanize_attr(@message,'bcc_addr') + ':'
|
||||
%td
|
||||
= address_formatter(@mail.Bcc.to_s,:show)
|
||||
%tr
|
||||
%td{:class=>"field_name"}
|
||||
= humanize_attr(@message,'subject') + ':'
|
||||
%td
|
||||
= subject_formatter(@message,:show)
|
||||
%tr
|
||||
%td{:class=>"field_name"}
|
||||
= humanize_attr(@message,'date') + ':'
|
||||
%td
|
||||
= date_formatter(@date)
|
||||
|
||||
= hidden_field_tag 'uids[]', @message.uid
|
||||
= hidden_field_tag 'source', 'show'
|
||||
|
|
Loading…
Reference in a new issue