Open
Bug 1130592
Opened 11 years ago
Updated 10 years ago
email_in treats html alternative as an attachment
Categories
(Bugzilla :: Incoming Email, defect)
Tracking
()
ASSIGNED
People
(Reporter: altlist, Assigned: altlist)
Details
Attachments
(2 files)
|
377 bytes,
patch
|
LpSolit
:
review-
|
Details | Diff | Splinter Review |
|
829 bytes,
application/mbox
|
Details |
When replying to a bugzilla ticket via email (from outlook), the response includes both a plain text and html version. email_in treats the html version as an attachment, whereas it should be dropped.
This is because email_in treats alternative text as an attachment. Could someone explain why? The attached patch "solves" my particular situation.
Comment 1•11 years ago
|
||
The answer is in email_in.pl itself:
# Get the first part of the email that contains a text body,
# and make all the other pieces into attachments. (This handles
# people or MUAs who accidentally attach text files as an "inline"
# attachment.)
Assignee: create-and-change → incoming.email
Component: Creating/Changing Bugs → Incoming Email
| Assignee | ||
Comment 2•11 years ago
|
||
Yes, I saw that. But I don't understand the reasoning to treat alternative text bodies as attachments. Seems like the code should just pick one, and drop the rest.
Updated•11 years ago
|
Attachment #8560696 -
Attachment is patch: true
Attachment #8560696 -
Attachment mime type: text/x-patch → text/plain
| Assignee | ||
Updated•11 years ago
|
Attachment #8560696 -
Flags: review?(dylan)
Comment 3•11 years ago
|
||
As said in comment 1, if your patch or attachment is included inline, then it would be lost.
| Assignee | ||
Comment 4•11 years ago
|
||
Hi Frederic,
I think there's a disconnect here. When I reply to a bugzilla email via Outlook, it is Outlook itself that includes both a plain-text and html-based version of the email response. I'm not inlining nor attaching.
Bugzilla however, assumes the alternate version of the response is an attachment, when instead, it should just drop the alternate version.
Comment 5•11 years ago
|
||
(In reply to Albert Ting from comment #4)
> Bugzilla however, assumes the alternate version of the response is an
> attachment, when instead, it should just drop the alternate version.
Assuming you have a real inline attachment and an HTML version of the text, is there a way to distinguish them? I don't use Outlook myself.
| Assignee | ||
Comment 6•11 years ago
|
||
The content-type does say multipart/alternative, something like below:
> Content-Type: multipart/alternative;
> boundary="_ABC_"
>
> --_ABC_
> Content-Type: text/plain; charset="utf-8"
> Content-Transfer-Encoding: base64
>
> <encoded text>
>
> --_ABC_
> Content-Type: text/html; charset="utf-8"
> Content-Transfer-Encoding: base64
>
> <encoded text>
>
> --_ABC_
And if one adds a real attachment, the main content type will be multipart/mixed, with the first block containing the above embedded multipart/alternative block
Updated•10 years ago
|
Assignee: incoming.email → altlist
Status: NEW → ASSIGNED
Comment 7•10 years ago
|
||
Comment on attachment 8560696 [details] [diff] [review]
v1
Can you attach a full email with the structure of comment 6? The code in email_in.pl seems correct. If it detects a multipart/alternative header, it extracts the text/plain part and discard the text/html one. So the text/html part is never included as attachment.
Attachment #8560696 -
Flags: review?(dylan) → review-
| Assignee | ||
Comment 8•10 years ago
|
||
Hi Frederick, see sample html_response file. I stripped out various email headers to keep it simple.
You need to log in
before you can comment on or make changes to this bug.
Description
•