M
mike
I am trying to attach an ms word doc to a perl message using:
use MIME::Lite;
Here are the parts of the code I an wondering about:
# The base path to the hbdata files
my $filebase = "/home/blah";
# The file fully qualified
my $attch_file = "$filebase/some.doc";
#who the email is being sent to
my $To = "somebody\@theirplace.com";
# To and From email addresses
my $from = "somewhere\@myplace.com";
my $mymsg = "test";
my $msg = new MIME::Lite
From =>$from,
To =>$To,
Subject =>'a subject',
Type =>'multipart/mixed',
Data =>"$mymsg";
attach $msg
Type =>'application/msword doc',
Disposition =>'attachment',
Encoding =>'binary',
Path =>$attch_file;
$msg->send;
This gets sent but the document is not recognized properly when I open
the attachment.
I deleted the line: Encoding =>'binary',
figuring the application would figure it out by itself and it did.
However, what should " Encoding =>'', " be?
Any reponses are appreciated.
Mike
use MIME::Lite;
Here are the parts of the code I an wondering about:
# The base path to the hbdata files
my $filebase = "/home/blah";
# The file fully qualified
my $attch_file = "$filebase/some.doc";
#who the email is being sent to
my $To = "somebody\@theirplace.com";
# To and From email addresses
my $from = "somewhere\@myplace.com";
my $mymsg = "test";
my $msg = new MIME::Lite
From =>$from,
To =>$To,
Subject =>'a subject',
Type =>'multipart/mixed',
Data =>"$mymsg";
attach $msg
Type =>'application/msword doc',
Disposition =>'attachment',
Encoding =>'binary',
Path =>$attch_file;
$msg->send;
This gets sent but the document is not recognized properly when I open
the attachment.
I deleted the line: Encoding =>'binary',
figuring the application would figure it out by itself and it did.
However, what should " Encoding =>'', " be?
Any reponses are appreciated.
Mike