Feature #14945
closedOutlook inline image replace [cid:..] by redmine !inline image!
0%
Description
When receiving an outlook mail,
if
[cid:image001.png@01CEB495.D0962270]
would be replaced by
!image001.png!
It would just be perfect!
Updated by Luc Vandenbroucke over 11 years ago
I send a mail with screen shots to redmine.
Now, the screen shots become attachments like image001.png, this is ok, but the place where the image was becomes the text [cid:image001.png@01CEB495.D0962270].
What I do now, every time is change all descriptions like
[cid:image001.png@01CEB495.D0962270] to , and it looks like the original.
Updated by Jan Niggemann (redmine.org team member) over 11 years ago
- Status changed from New to Needs feedback
I don't think this should be in redmine core, every mail system does things differently...
We had the same idea and wrote a plugin that uses regex to achieve the replacement (plain_text_body from mail_handler.rb):
module MailHandlerPatch
def self.included(base)
base.send(:include, InstanceMethods)
base.class_eval do
alias_method_chain :plain_text_body, :notes_cleanup
end
end
module InstanceMethods
def plain_text_body_with_notes_cleanup
body = plain_text_body_without_notes_cleanup
body.gsub! /\(Embedded image moved to file: (.*)\)/, '!\1!'
body.gsub! /^\|------------>\s*?\n\| ([^|]*)\|\s*?\n\|------------>\s*?\n >-{80,}\|\s*?\n \|([^|]*)\|\s*?\n >-{80,}\|/m, '|\1|\2|'
body
end
end
end
This converts the stuff our Lotus Notes uses to
Updated by Luc Vandenbroucke over 11 years ago
You are completely right, and thanks for the code.
I will make this work for outlook.
Updated by Jan Niggemann (redmine.org team member) about 11 years ago
- Status changed from Needs feedback to Closed
- Resolution set to Invalid
Updated by Heiko Robert over 9 years ago
has anybody written already a patch/plugin for the outlook use case?
Updated by Michael Ziegler over 9 years ago
i would also need a patch/plugin receiving outlook emails :-)