Fixed issue #203 - Mailprocessing: Reply-To header are ignored.

This commit is contained in:
Rolf Schmidt 2017-04-26 16:50:57 +02:00
parent 98cac39c80
commit d3a3eed7a4
6 changed files with 26 additions and 6 deletions

View file

@ -340,7 +340,10 @@ class App.TicketZoomArticleActions extends App.Controller
if article.sender.name is 'Agent' && !article.from.match(user.email)
articleNew.to = article.to
else
articleNew.to = article.from
if article.reply_to
articleNew.to = article.reply_to
else
articleNew.to = article.from
# if sender is customer but in article.from is no email, try to get
# customers email via customer user

View file

@ -7,6 +7,12 @@
<div class="article-meta-value flex contain-text"><%- @AddressLine(@article.from) %></div>
</div>
<% end %>
<% if @article.reply_to: %>
<div class="horizontal article-meta-row">
<div class="article-meta-key u-textTruncate"><%- @T('Reply-To') %></div>
<div class="article-meta-value flex contain-text"><%- @AddressLine(@article.reply_to) %></div>
</div>
<% end %>
<% if @article.to: %>
<div class="horizontal article-meta-row">
<div class="article-meta-key u-textTruncate"><%- @T('To') %></div>

View file

@ -396,20 +396,20 @@ class Channel::EmailParser
=begin
parser = Channel::EmailParser.new
ticket, article, user = parser.process(channel, email_raw_string)
ticket, article, user, mail = parser.process(channel, email_raw_string)
returns
[ticket, article, user]
[ticket, article, user, mail]
do not raise an exception - e. g. if used by scheduler
parser = Channel::EmailParser.new
ticket, article, user = parser.process(channel, email_raw_string, false)
ticket, article, user, mail = parser.process(channel, email_raw_string, false)
returns
[ticket, article, user] || false
[ticket, article, user, mail] || false
=end
@ -564,6 +564,7 @@ returns
content_type: mail[:content_type],
body: mail[:body],
from: mail[:from],
reply_to: mail[:"reply-to"],
to: mail[:to],
cc: mail[:cc],
subject: mail[:subject],

View file

@ -155,7 +155,7 @@ class CreateTicket < ActiveRecord::Migration
t.column :to, :string, limit: 3000, null: true
t.column :cc, :string, limit: 3000, null: true
t.column :subject, :string, limit: 3000, null: true
# t.column :reply_to, :string, :limit => 3000, :null => true
t.column :reply_to, :string, limit: 3000, null: true
t.column :message_id, :string, limit: 3000, null: true
t.column :message_id_md5, :string, limit: 32, null: true
t.column :in_reply_to, :string, limit: 3000, null: true

View file

@ -0,0 +1,9 @@
class AddReplyTo < ActiveRecord::Migration
def up
# return if it's a new setup
return if !Setting.find_by(name: 'system_init_done')
add_column :ticket_articles, :reply_to, :string, limit: 3000
end
end

View file

@ -362,6 +362,7 @@ Registergericht / Commercial Register of the Local Court: HRB 0000 AG Hof',
},
],
params: {
"reply-to": 'serviceteam@cylex.de',
from: 'CYLEX Newsletter <carina.merkant@cylex.de>',
from_email: 'carina.merkant@cylex.de',
from_display_name: 'CYLEX Newsletter',