You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue concerns Redmine 4.2.3, who is using this mail gem to handle incoming mails.
We have an issue when using forward mail as attachment from Outlook and sending the message to Redmine (who is using this mail gem). Normally, on reception, we would expect to receive the mail message and the added .msg attachment as an attachment. This is not the case.
We get the mail message, all the other attachments from the mail, but also from the added .msg attachment. But never the .msg attachment itself.
The .msg attachment is encoded like this:
...
--_012_342b0886c5894875a2dadf9b72a8b986TRUSTMBX01TRUSTTEAMLOCA_
Content-Type: message/rfc822
Content-Disposition: attachment;
creation-date="Tue, 21 Jun 2022 16:05:12 GMT";
modification-date="Tue, 21 Jun 2022 16:05:12 GMT"
...
I added some dirty code (I found on the internet) into Redmine to just add the rfc822 parts as attachments, but it would be nice to handle this correctly.
logger.info "Checking multipart"
if email.parts
email.parts.each do |part|
if (part.content_disposition =~ /attachment/i) && (part.content_type = "message/rfc822")
logger.info "Found email attachment in parts section"
contents = part.decoded.gsub(0x0a.chr, 0x0d.chr+0x0a.chr) # this is to change newline type in attachment
logger.info "Trying to parse it as email"
attachment_email = Mail.new(contents)
obj.attachments << Attachment.create(:container => obj,
:file => contents,
:filename => attachment_email.subject + ".eml",
:author => user,
:content_type => part.content_type)
logger.info "Attachment added"
end
end
end
logger.info "Attachements added"
Hello,
This issue concerns Redmine 4.2.3, who is using this mail gem to handle incoming mails.
We have an issue when using
forward mail as attachment
from Outlook and sending the message to Redmine (who is using this mail gem). Normally, on reception, we would expect to receive the mail message and the added .msg attachment as an attachment. This is not the case.We get the mail message, all the other attachments from the mail, but also from the added .msg attachment. But never the .msg attachment itself.
The .msg attachment is encoded like this:
And not like this:
What can we do, just to handle rfc822 parts as an attachment?
All help is very much appreciated.
The text was updated successfully, but these errors were encountered: