Improved error handling.
This commit is contained in:
parent
3982a3dadb
commit
92f0045bfc
2 changed files with 22 additions and 3 deletions
|
@ -66,7 +66,7 @@ class Channel::EmailParser
|
|||
|
||||
# set all headers
|
||||
mail.header.fields.each { |field|
|
||||
data[field.name.downcase.to_sym] = Encode.conv( 'utf8', field.to_s )
|
||||
data[field.name.to_s.downcase.to_sym] = Encode.conv( 'utf8', field.to_s )
|
||||
}
|
||||
|
||||
# set extra headers
|
||||
|
|
|
@ -47,7 +47,7 @@ Some Text',
|
|||
To: customer@example.com
|
||||
Subject: äöü some subject
|
||||
|
||||
Some Textäöü".encode("ISO-8859-1"),
|
||||
Some Textäöü",
|
||||
:success => true,
|
||||
:result => {
|
||||
0 => {
|
||||
|
@ -61,6 +61,25 @@ Some Textäöü".encode("ISO-8859-1"),
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
:data => "From: me@example.com
|
||||
To: customer@example.com
|
||||
Subject: äöü some subject
|
||||
|
||||
Some Textäöü".encode("ISO-8859-1"),
|
||||
:success => true,
|
||||
:result => {
|
||||
0 => {
|
||||
:ticket_priority => '2 normal',
|
||||
:title => '', # should be äöü some subject, but can not be parsed from mime tools
|
||||
},
|
||||
1 => {
|
||||
:body => 'Some Textäöü',
|
||||
:ticket_article_sender => 'Customer',
|
||||
:ticket_article_type => 'email',
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
files.each { |file|
|
||||
|
|
Loading…
Reference in a new issue