Skip to content

Commit 0a7105a

Browse files
committed
Some more content-types
1 parent 981ca6c commit 0a7105a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/models/message.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ def from_mail(mail, list, list_seq)
7171
attachments.attach(io: file, filename: part.filename, content_type: part.content_type)
7272
else
7373
case part.content_type&.downcase
74+
when 'application/pgp-signature'
75+
# ignore
7476
when 'application/ms-tnef'
7577
file = StringIO.new(part.decoded)
7678
attachments.attach(io: file, filename: part.filename || 'noname', content_type: part.content_type)
77-
when /^text\/plain/, /text\/enriched;/, nil
79+
when /^text\/plain/, /text\/enriched;/, 'message/rfc822', nil
7880
(self.body ||= '') << Kconv.toutf8(part.body.raw_source)
79-
when /^text\/html;/
81+
when /^text\/html/
8082
(self.html_body ||= '') << Kconv.toutf8(part.body.raw_source)
8183
else
8284
puts "Unknown content_type: #{part.content_type}"

0 commit comments

Comments
 (0)