Opened 15 years ago
Closed 15 years ago
#105 closed enhancement (fixed)
Better support for inline attachments and multiple body parts
Reported by: | anonymous | Owned by: | bas |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | email2trac | Version: | 0.4 |
Keywords: | Cc: | ben@… |
Description
Right now, email2trac assumes that the first text part of a message is its body, and that everything else is an attachment.
With modern email clients, it's possible to create a message that has an attachment in the middle of its body. MIME represents this kind of a thing as a text/plain part followed by an image type followed by another text/plain part.
When this happens, email2trac produces a ticket whose description contains only the first part of the body, and gives it two attachments: one for the image, and one for the second part of the body. This is wrong.
The patch that I am attaching implements the following features
Proper support for multiple body parts
If a message's body is broken up into several pieces (by attachments in the middle of the message), the ticket's description is set to the entire body, not just the first part
For example, from an email like this:
some text <some image> more text
the ticket that is created will have "some text" and "more text" in its description
Links to attachments inside the ticket description
[attachment:filename] links are automatically placed inside the ticket description, so that message text can clearly refer to them.
For example, an email like
I opened this file in your app: <my file> and I got the following error dialog: <image>
will generate a ticket like this:
I opened this file in your app: [attachment:"my file"] and I got the following error dialog: [attachment:"image"]
Inline image attachments
If an attachment is of type image/* and its Content-Disposition is inline, then a Trac Image macro is placed inside the ticket description in the appropriate place, so that the resulting ticket has the image inline where it belongs in the text.
The same email as in the previous example, if the image is inline, will result in:
I opened this file in your app [attachment:"my file"] and I got the following error dialog: [[Image(image)]]
Attachments (1)
Change History (7)
Changed 15 years ago by ben@…
comment:1 Changed 15 years ago by bas
- Cc ben@… added
- Status changed from new to assigned
comment:2 Changed 15 years ago by ben@…
That would be quite nice, thanks
comment:3 follow-up: ↓ 4 Changed 15 years ago by bas
Ok i will create a username for you. what is your preferred loginname? I have to have some information from you for our CUA (Central User Administration):
- First name
- Surname
I am on vacation to build a bouse till 3 january, but i can stiil create accounts.
comment:4 in reply to: ↑ 3 Changed 15 years ago by ben@…
I'm Ben Artin, preferred username is bromine.
comment:5 Changed 15 years ago by bas
Account is created. You can apply your patches. Good luck and thanks again for the improvements.
comment:6 Changed 15 years ago by bromine
- Resolution set to fixed
- Status changed from assigned to closed
Applied to trunk -- changeset:236
Ben Thanks a lot of this enhancement. You have have add a lot new features to email2trac . I can give you write access to the repository so you can apply your patches and enhancements directly if you want.