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