Modify

Opened 13 years ago

Closed 13 years ago

#110 closed enhancement (fixed)

Embedded images in emails

Reported by: martin.poeschmann@… Owned by: bas
Priority: minor Milestone:
Component: email2trac Version: 0.6
Keywords: Cc:

Description

When sending an email with an embedded image (from outlook in my case), the resulting attachment to the ticket is too small.

I changed line 1115 to: # Insert the attachment # fd = open(path, 'rb' )

Because Outlook sets the minetype to image/jpg the following change has to be made: line 1061: ext = mimetypes.guess_extension(part.get_content_type(),False)

Attachments (0)

Change History (4)

comment:1 Changed 13 years ago by cc@…

This is the author of comment:ticket:93:1. Martin, your suggestion has done the trick for us. Binary attachments are now working correctly. Thanks for the fix!

The line numbers from Martin's comment may be off depending on the version of the script and whether your copy has been customized at all. We just searched for the original snippets and modified them to match the modified snippets.

Original Snippet 1:

# Insert the attachment
# 
fd = open(path)

Modified Snipped 1 (matching Martin's description):

# Insert the attachment
# 
fd = open(path, 'rb')

Original Snippet 2:

ext = mimetypes.guess_extension(part.get_content_type())

Modified Snippet 2 (matching Martin's description):

ext = mimetypes.guess_extension(part.get_content_type(), False)

comment:2 Changed 13 years ago by bas

  • Status changed from new to assigned

Thanks for the patch and suggestion. I will into it when i am back from holidays

comment:3 Changed 13 years ago by bas

  • Version changed from 0.4 to trunk

I applied the patch to trunk

comment:4 Changed 13 years ago by bas

  • Resolution set to fixed
  • Status changed from assigned to closed
  • Version changed from trunk to 0.6

will release new version

Add Comment

Modify Ticket

Change Properties
Action
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.