Feature #14945
closed
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.
- 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
You are completely right, and thanks for the code.
I will make this work for outlook.
- Status changed from Needs feedback to Closed
- Resolution set to Invalid
has anybody written already a patch/plugin for the outlook use case?
- Category set to Email receiving
i would also need a patch/plugin receiving outlook emails :-)
Also available in: Atom
PDF