Opened 7 years ago

Closed 7 years ago

#1413 closed defect (fixed)

Word documents as attachments can't be open from the ticket (Windows2003)

Reported by: faiksayran@… Owned by: bas
Priority: normal Component: EmailtoTracScript
Severity: blocker Keywords: attachment
Cc: Trac Release: 0.10


I sent an email with a word document attached. email2trac successfully created the ticket and the attachment. But from trac I am not able to open the attachment as a word document. It tries to open it as "encoded text".


Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by bas

  • Status changed from new to assigned

I have just tried to send an email with a word attachment and open it in trac without any problems.
Trac can not generate a preview you have to download the file:

Ticket #1: 8-Maart-2007.doc
File 8-Maart-2007.doc, 111.5 kB (added by Bas van der Vlies, 15 seconds ago)

Added by email2trac
HTML preview not available. To view the file, download the file. 

Maybe yoo have to configure the mime-types for your browser.

comment:2 Changed 7 years ago by anonymous

  • Summary changed from Word documents as attachments can't be open from the ticket to Word documents as attachments can't be open from the ticket (Windows2003)

Thanks for the response. I think I found the problem. First of all I missed a very important detail (so sorry about that): I am using email2Trac scrip on a windows 2003 server. Also Trac is running on that server as well. A scheduled batch periodically reads email from the pop server and runs them throug Email2Trac script. There were 2 problems. I patched the script for those.

  • Unicode filenames can't be processed. I encoded them to utf-8 that fixed.
  • util.create_unique_file was creating text files on NTFS. I used open (...,'wb') and open(...,'rb'). That is also fixes the problem.

Anything else works fine on Windows platform. FYI


comment:3 Changed 7 years ago by bas

Can you send me the diff and can you update the wiki page. How to setup email2trac under windows?

If i

comment:4 Changed 7 years ago by anonymous

Yes, I will gladly.

comment:5 Changed 7 years ago by bas

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bas. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.