J
Jerry Krinock
When Apple's Mail.app composes a message with a .zip attachment, it
adds an "x-mac-auto-archive" attribute to Content-Type, which I
believe tells the receiving Mail.app to automatically unzip the
attachment upon receipt. I would like to be able to send messages
behaving like that when I use MIME::Lite. Taking a wild guess, I
wrote this code:
$msg->attach(
Type => 'application/zip',
Path => $myPath,
'x-mac-auto-archive' => 'yes',
Filename => "MyScript.app.zip"
) ;
What I get from that (which fails to make Mail.app automatically
unzip) is:
Content-Type: application/zip; name="MyScript.app.zip"
X-Mac-Auto-Archive: yes
A similar message sent by the real Mail.app gives me a Content-Type
like this:
Content-Type: application/zip;
x-mac-auto-archive=yes;
name="MyScript.app.zip"
Apparently, the problem is that instead of becoming an attribute of
Content-Type, my x-mac-auto-archive becomes a Header field. (I hope
my terminology is correct.)
I poked around in the MIME::Lite source code for a while but didn't
get anywhere. Does anyone know how to set an custom attribute ^of^ a
header field using Perl?
Sincerely,
Jerry Krinock
adds an "x-mac-auto-archive" attribute to Content-Type, which I
believe tells the receiving Mail.app to automatically unzip the
attachment upon receipt. I would like to be able to send messages
behaving like that when I use MIME::Lite. Taking a wild guess, I
wrote this code:
$msg->attach(
Type => 'application/zip',
Path => $myPath,
'x-mac-auto-archive' => 'yes',
Filename => "MyScript.app.zip"
) ;
What I get from that (which fails to make Mail.app automatically
unzip) is:
Content-Type: application/zip; name="MyScript.app.zip"
X-Mac-Auto-Archive: yes
A similar message sent by the real Mail.app gives me a Content-Type
like this:
Content-Type: application/zip;
x-mac-auto-archive=yes;
name="MyScript.app.zip"
Apparently, the problem is that instead of becoming an attribute of
Content-Type, my x-mac-auto-archive becomes a Header field. (I hope
my terminology is correct.)
I poked around in the MIME::Lite source code for a while but didn't
get anywhere. Does anyone know how to set an custom attribute ^of^ a
header field using Perl?
Sincerely,
Jerry Krinock