Attachments sent from RT are 'inline'

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I’ve implemented the ‘NotifyWithAttachments’ ScripAction, but for some reason,
the attachments always have the Content-Disposition set to ‘inline’ instead
of ‘attachment’ like the Scrip says it should. Anybody experience this
problem before? Relevent version numbers are below:

RT : 2.0.13
MailTools : 1.44
MIME::Tools : 5.411

  • -Doug

Douglas E. Warner dwarner@ctinetworks.com Network Engineer
CTI/PAdotNET http://ctinetworks.com +1 717 975 9000
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+Ee7YJV36su0A0xIRAhkfAJ0fV86EnIhg9Z/eS/YV5Kb+gxzAMwCgmw93
7NdMcyqg1WEAd+dPTw+jqjE=
=TvKt
-----END PGP SIGNATURE-----

I’ve implemented the ‘NotifyWithAttachments’ ScripAction, but for some reason,
the attachments always have the Content-Disposition set to ‘inline’ instead
of ‘attachment’ like the Scrip says it should. Anybody experience this
problem before? Relevent version numbers are below:

If you mean you have your own implementation, I cannot help you. But if
you have just installed the implementation in contrib, it’s vaguely
buggy and fails to set Content-Type for the first part (transaction
text). This confuses some mail programs.

If you wish, I can send our modified NotifyWithAttachment to you.

Lynoure Rajamäki
lynoure@otaverkko.fi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1On Thursday 02 January 2003 01:40, Lynoure Rajam�ki wrote:

If you mean you have your own implementation, I cannot help you. But if
you have just installed the implementation in contrib, it’s vaguely
buggy and fails to set Content-Type for the first part (transaction
text). This confuses some mail programs.

If you wish, I can send our modified NotifyWithAttachment to you.

Yes, I’m using the one from the contrib area. Would you mind attaching it to
the list so everyone can benefit?

  • -Doug

Douglas E. Warner dwarner@ctinetworks.com Network Engineer
CTI/PAdotNET http://ctinetworks.com +1 717 975 9000
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+FEgoJV36su0A0xIRAjaqAKDuWG7i7PpqYw+woBA64AxZ6GAOKACgrp05
fw20u1RSNiL4HISiukL/JQs=
=pPDJ
-----END PGP SIGNATURE-----

Yes, I’m using the one from the contrib area. Would you mind attaching it to
the list so everyone can benefit?

Ok, though my version is by no means perfect either (I took the shortcut
and set Content-Type to fit our needs, and it’s not right for all other
character sets). Also, I am very new to perl…

Lynoure Rajamäki
lynoure@otaverkko.fi
lynoure@tuug.fi

NotifyWithAttachment.pm.fixed (2.46 KB)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1On Friday 03 January 2003 02:08, Lynoure Rajam�ki wrote:

Ok, though my version is by no means perfect either (I took the shortcut
and set Content-Type to fit our needs, and it’s not right for all other
character sets). Also, I am very new to perl…

Don’t worry, it worked great! Thanks for the updated script.

  • -Doug

Douglas E. Warner dwarner@ctinetworks.com Network Engineer
CTI/PAdotNET http://ctinetworks.com +1 717 975 9000
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+GZamJV36su0A0xIRAinFAKCIyv9qFGb8saRQoLqO29lUOkut9wCfcvJz
2/mC2Mv4kwIks6IOAXllhaY=
=7GiX
-----END PGP SIGNATURE-----

Yes, I’m using the one from the contrib area. Would you mind attaching it to
the list so everyone can benefit?

Ok, though my version is by no means perfect either (I took the shortcut
and set Content-Type to fit our needs, and it’s not right for all other
character sets). Also, I am very new to perl…

Something to add to the archives for this. Somewhere along the way, the
’MIME-Version’ header gets dropped. This makes certain mailers, such as
Pine, not recognise the mail thus generated as a valid multipart mail
(Brad Marshall noticed this problem).

Hence, add the following line after ‘make_multipart’ (~line43):

$self->TemplateObj->MIMEObj->head->add(‘MIME-Version’, ‘1.0’ );

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B             Operations/Security

Something to add to the archives for this. Somewhere along the way, the
’MIME-Version’ header gets dropped. This makes certain mailers, such as
Pine, not recognise the mail thus generated as a valid multipart mail
(Brad Marshall noticed this problem).

It didn’t seem to be there even to start with (see Robert Grasso’s
message in rt-devel). Actually it isn’t even in the messages that are
sent without NotifyWithAttachment. I wonder whether the MIME module sets
this header automatically at all. (At least I didn’t notice any part of
the code that would do that, though it should…) IMO MIME module is
the place where this should be fixed.

Hence, add the following line after ‘make_multipart’ (~line43):

$self->TemplateObj->MIMEObj->head->add(‘MIME-Version’, ‘1.0’ );

Thanks for the workaround though. :slight_smile:

Lynoure Rajamäki
lynoure@otaverkko.fi
lynoure@tuug.fi