[rt-devel] Possible fix to attachment mail problem (2.0.x)

Matthew D. Stock stock at cse.Buffalo.EDU
Wed Jul 25 08:39:07 EDT 2001


I think I've found where things go wrong, but I don't have anough of a
global understanding of the code to put a patch together.  I figured that
I'd report my findings and see if someone can suggest the right way to fix
what I'm seeing.

The problem that I'm running into relates to mime sent into RT.  It gets
parsed correctly and displayed via WebRT, but outgoing mail doesn't provide
any content at all, even any initial text part.

$Transaction->Content() returns the first MIME object that is associated
with the currnet transaction.  It finds them by doing a query on the
Attachments table.  It appears that with a non-MIME (or at least
non-multipart) input, there is only one "attachment" and that holds the
message in the content field.  In the case of a multipart mime entry
however, the format is a little different.  In my test message, I had two
parts.  The first was a text part, and the second was a PDF doc.  The
Attachments table listed 3 records - the 2nd and 3rd ones were my two
parts, but the 1st one appeared to be just the headers for the message,
with an EMPTY content field.  Since that's the one that is being pulled for
the outgoing email, that's why the message appears empty.

So, I'm wondering what the right fix is.  It seems like the "right" thing
to do would be to be a bit more clever about mailing out MIME, possibly by
iterating over all of the parts and printing them where possible.  I'll try
that first.  That aside, is that "header" record in the Attachments table
correct?

I'll keep poking, but any suggestions are appreciated.
Thanks,
  -Matt




More information about the Rt-devel mailing list