This is how Qualcomm's Eudora mail client specifies file names in its
embedded MIME-compliant (?) attachments:
Content-Type: application/rtf; charset="us-ascii"
Content-Disposition: attachment; filename="d44-21.rtf"
That complies with RFC1806. There are *lots* of Eudoras out there.
Achim pointed out how MHonarc parses out the file name for an attached file:
from MhonArc/lib/mhexternal.pl:
## See if name argument is to be used
($nameparm) = $fields{'content-type'} =~ /name=(\S+)/i;
^^^^^^^^^^^^^^ ^^^^^
$nameparm =~ s/['"]//g;
$nameparm =~ s/.*[\/\\:]//;
if ($args =~ /usename/i) {
$name = $nameparm;
}
as indicated by '^'s: Mhonarc is looking for filename in Content-Type
header field and not for in content-disposition. You may try (untested
/unverified/unproven...) to use instead
(($nameparm) = $fields{'content-type'} =~ /name=(\S+)/i) ||
(($nameparm) = $fields{'content-disposition'} =~ /name=(\S+)/i);
May I suggest:
(($nameparm) = $fields{'content-disposition'} =~ /filename=(\S+)/i) ||
(($nameparm) = $fields{'content-type'} =~ /name=(\S+)/i);
to give priority to RFC1806 and allow for the deprecated "name=" in RFC1521.
-- SP