Project

General

Profile

Feature #3413 » mail_handler_ignore_inline_attachments_patch.diff

Egidijus Zideckas, 2012-11-20 09:46

View differences:

.gitignore
/Gemfile.lock
/Gemfile.local
/nbproject/private/
app/models/mail_handler.rb
def add_attachments(obj)
if email.attachments && email.attachments.any?
email.attachments.each do |attachment|
obj.attachments << Attachment.create(:container => obj,
:file => attachment.decoded,
:filename => attachment.filename,
:author => user,
:content_type => attachment.mime_type)
end
email.attachments.each do |attachment|
if attachment.header.to_s.match(/Content-Disposition: attachment;/)
obj.attachments << Attachment.create(:container => obj,
:file => attachment.decoded,
:filename => attachment.filename,
:author => user,
:content_type => attachment.mime_type)
else
logger.info "MailHandler: ignoring signature attachment #{attachment.filename} " if logger && logger.info
end
end
end
end
(2-2/3)