790 bytes, text/plain
9.96 KB, patch
Frédéric Buclin: review-
|Details | Diff | Splinter Review|
Here's my problem: I have an Exchange server that sends MIME-attached email with multiple parts: text/plain text/html The MIME parser included with bug_email.pl grabs the text/plain part and appends the text/html part to the message when submitting a bug via email. I'd like to the option to include ONLY the text/plain part when processing a bug via email.
Sounds like bug_email.pl isn't recognizing multipart/alternative (which means you pick whichever piece you like the best and discard the rest, rather than treating the rest as attachments). I'll call this a bug, rather than a feature request.
-> Bugzilla product
Is it possible to attach a test mail here having this html alternative text?
Created attachment 97177 [details] Sample email (I deleted some headers which are not needed) See also Appendix A in http://www.ietf.org/rfc/rfc2049.txt for an example (created by Mozilla post 1.1). See "5.1. Multipart Media Type" in http://www.ietf.org/rfc/rfc2046.txt for the related RFC.
CCing Dan Berlin, who from stuff I've seen around, I know is actually using the bug_email stuff. I'd appreciate any input or fixes you'd be willing to provide on these bugs :-)
*** Bug 274837 has been marked as a duplicate of this bug. ***
Created attachment 168836 [details] [diff] [review] Patch to BugzillaEmail.pm, bug_email.pl, bugzilla_email_append.pl Jeez Dave is fast at discovering duplicates, lol. Let's try this again... * Factors out dump_entity (which is 99% similar between bug_email.pl and bugzilla_email_append.pl) * When encountering multipart/alternative, first looks for a text/plain and chooses to parse only that part. If a text/plain doesn't exist, choose the first part and parse only that part. Not sure if this is the best way to handle @attachments, which are used by bug_email (as a global) but not at all by bugzilla_email_append. Just noticed that this patch is similar to bug 176190. Doesn't really affect the interface with Bugzilla in my opinion, should stay out of the way of the ever-pending re-integration.
(In reply to comment #7) > Jeez Dave is fast at discovering duplicates, lol. Let's try this again... heh, sorry about that. > Just noticed that this patch is similar to bug 176190. Wonder if it's worth trying to combine them, since the code to separate that out is getting shared in BugzillaEmail.pm now anyway. We keep talking about doing a complete write from scratch on inbound email, but nothing's happening with it yet, so we might as well fix what we have in the meantime. :)
Comment on attachment 168836 [details] [diff] [review] Patch to BugzillaEmail.pm, bug_email.pl, bugzilla_email_append.pl Looks like this patch needs a review...?
Comment on attachment 168836 [details] [diff] [review] Patch to BugzillaEmail.pm, bug_email.pl, bugzilla_email_append.pl bitrot
No enhancement nor code refactor on branches.
We removed bug_email from the code, and email_in.pl doesn't even support attachments yet.