I'm trying to write a test script that will send a .doc file using the
mime::lite. I had it working with a text file, but when I try with
a .doc file, nothing happens. This is my code:
$msg = MIME::Lite->new(
From =>'...@myhost.com',
To =>'edja...@quirkyjapan.or.tv',
Subject =>'A message with 2 parts...',
Type =>'multipart/mixed');
### Add parts (each "attach" has same arguments as "new"):
$msg->attach(Type =>'BINARY',
Data =>"Here's the GIF file you wanted");
$msg->attach(Type =>'application/msword',
Path =>'test.doc');
$text = $msg->as_string;
$msg->send;
print "done";
I assume the mistake is in this line:
$msg->attach(Type =>'application/msword',
Thanks in advance.