Skip to content

Commit 5f481f7

Browse files
committed
Handle application/ms-tnef; as an attachment
ruby-dev: 1148
1 parent f6e9c2b commit 5f481f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/models/message.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ def from_mail(mail, list, list_seq)
7272
attachments.attach(io: file, filename: part.filename, content_type: part.content_type)
7373
else
7474
case part.content_type.downcase
75+
when 'application/ms-tnef'
76+
file = StringIO.new(part.decoded)
77+
attachments.attach(io: file, filename: part.filename || 'noname', content_type: part.content_type)
7578
when /^text\/plain/, /text\/enriched;/
7679
(self.body ||= '') << Kconv.toutf8(part.body.raw_source)
7780
when /^text\/html;/

0 commit comments

Comments
 (0)