Fixed issue #2397 - Unable to process emails without From (but with Sender) header.

This commit is contained in:
Martin Edenhofer 2018-12-11 09:36:16 +01:00
parent 23059d7c90
commit 3fb7e5bee3
2 changed files with 40 additions and 1 deletions

View file

@ -5,7 +5,7 @@
class Channel::EmailParser
EMAIL_REGEX = /.+@.+/
RECIPIENT_FIELDS = %w[to cc delivered-to x-original-to envelope-to].freeze
SENDER_FIELDS = %w[from reply-to return-path].freeze
SENDER_FIELDS = %w[from reply-to return-path sender].freeze
=begin

View file

@ -107,6 +107,45 @@ Some Textäöü",
],
},
},
{
data: "Sender: me_sender@example.com
To: customer@example.com
Subject: äöü some subject 3
Some Textäöü",
channel: {
trusted: false,
},
success: true,
result: {
0 => {
priority: '2 normal',
title: 'äöü some subject 3',
},
1 => {
body: 'Some Textäöü',
sender: 'Customer',
type: 'email',
internal: false,
},
},
verify: {
users: [
{
firstname: '',
lastname: '',
fullname: 'me@example.com',
email: 'me@example.com',
},
{
firstname: '',
lastname: '',
fullname: 'customer@example.com',
email: 'customer@example.com',
},
],
},
},
{
data: "From: me@example.com
To: customer@example.com