Project

General

Profile

Actions

Feature #14945

closed

Outlook inline image replace [cid:..] by redmine !inline image!

Added by Luc Vandenbroucke over 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid

Description

When receiving an outlook mail,

if
[cid:]
would be replaced by
!image001.png!

It would just be perfect!

Actions #1

Updated by Etienne Massip over 10 years ago

What's the point??

Actions #2

Updated by Luc Vandenbroucke over 10 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:].

What I do now, every time is change all descriptions like
[cid:] to , and it looks like the original.

Actions #3

Updated by Jan Niggemann (redmine.org team member) over 10 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

Actions #4

Updated by Luc Vandenbroucke over 10 years ago

You are completely right, and thanks for the code.
I will make this work for outlook.

Actions #5

Updated by Jan Niggemann (redmine.org team member) over 10 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Invalid
Actions #6

Updated by Heiko Robert over 8 years ago

has anybody written already a patch/plugin for the outlook use case?

Actions #7

Updated by Toshi MARUYAMA over 8 years ago

  • Category set to Email receiving
Actions #8

Updated by Michael Ziegler over 8 years ago

i would also need a patch/plugin receiving outlook emails :-)

Actions

Also available in: Atom PDF