Making Attachments Use Valid MIME (and Work in 'Pine')

Hi there. We’re using RT::Action::NotifyWithAttachment (from contrib)
and noticed that messages with attachments sent by ‘RT’ weren’t working
in ‘Pine’ – the undecoded message was being displayed.

We tracked this down to the lack of a MIME-Version: header, which is
supposed to be there (but it seems some mailers can infer its presence
if it isn’t).

My colleague Qef fixed this with the following patch (which adds a
MIME-Version: header if there wasn’t one already and the message looks
like it’s using mime):

— 8 Oct 2002 09:50:11 -0000 1.1
+++ 15 Oct 2002 15:18:48 -0000 1.2
@@ -56,6 +56,10 @@


  • my $head = $self->TemplateObj->MIMEObj->head;
  • $head->replace(‘MIME-Version’ => ‘1.0’)
  • if $head->count(‘Content-Type’) && !$head->count(‘MIME-Version’);
    return 1;

Thought we share this in case anybody else has encountered problems
(there may be mailers other than ‘Pine’ affected by this).