Attachments in RT

Hi,

I’m modifying RT a bit so we can get some sort of a form interface going
where someone will fill in the boxes and a nice standard request will be
created (to avoid the “It doesn’t work” descriptions some people use to
describe their issues in life). Now, some of these forms have attachments
(more than one). I’ve got the following in the HTML:

Installation Instructions

and:

Backout Plan Document

Now, having played with the Display file, there is a bit that creates a MIME
Object:

    my $MIMEObj = MakeMIMEEntity( Subject => $Subject,
            From => $ARGS{'From'},
            Cc => $Cc,
            Body => $TicketContent,
            AttachmentFieldName => 'InstallInstruct');

Now, having been desperate and adding hordes of lines to
lib/RT/Interface/Web.pm, I eventually found out that the file new gets
attached, because the variable either does not exist, or is empty by the
time it reaches Web.pm. This is probably more a Mason question than RT, but
I was hoping someone could give me pointer to:

A) Why the $ARGS{InstallInstruct} has na value by the time it gets to the
sub MakeMIMEEntity routine. And,
B) Any suggestions how I can have two files attached in one go? Should I
just repeat the my $MIMEObj = MakeMIMEEntity, my %create_args = and
$Ticket->Modify bits and insert $id value after it was created with the
first go?

Thanks
Carel

THIS E-MAIL AND ANY ATTACHMENTS MAY CONTAIN INFORMATION THAT IS CONFIDENTIAL
AND/OR LEGALLY PRIVILEGED. IF YOU ARE NOT THE INTENDED RECIPIENT, PLEASE DO
NOT READ IT, DELETE IT IMMEDIATELY AND INFORM iTOUCH (UK) LIMITED BY REPLY
E-MAIL OR TELEPHONING +44 (0)20 7613 6000. This Email has been checked for
viruses but it is your responsibility to conduct your own virus checks on
all parts of it.

Found the solution for A straight after sending the mail :slight_smile: I was missing
the enctype=“multipart/form-data” bit in my form. Thought I tried that, but
turned out I was modifying the wrong file :slight_smile:

A) Why the $ARGS{InstallInstruct} has na value by the time it gets to the
sub MakeMIMEEntity routine. And,

Carel
THIS E-MAIL AND ANY ATTACHMENTS MAY CONTAIN INFORMATION THAT IS CONFIDENTIAL
AND/OR LEGALLY PRIVILEGED. IF YOU ARE NOT THE INTENDED RECIPIENT, PLEASE DO
NOT READ IT, DELETE IT IMMEDIATELY AND INFORM iTOUCH (UK) LIMITED BY REPLY
E-MAIL OR TELEPHONING +44 (0)20 7613 6000. This Email has been checked for
viruses but it is your responsibility to conduct your own virus checks on
all parts of it.