breezesunshine
Technical User
With the following code, I keep getting this error "'sendmail' is not recognized as an internal or external command, operable program or batch file."
I am using ActivePerl on Windows. MIME::Lite has been installed.
Can someone please shed some light on the possible causes?
Thanks very much!
---------
use MIME::Lite;
### Create the multipart "container":
$msg = MIME::Lite->new(
From =>'XX@yahoo.com',
To =>'XX@hotmail.com',
Subject =>'A message with 2 parts...',
Type =>'multipart/mixed'
);
### Add the text message part:
### (Note that "attach" has same arguments as "new"):
$msg->attach(Type =>'TEXT',
Data =>"Here's the JPG file you wanted"
);
### Add the image part:
$msg->attach(Type =>'image/jpg',
Path =>'d:/test.jpg',
Filename =>'test.jpg',
Disposition => 'attachment'
);
### Format as a string:
$str = $msg->as_string;
### Write just the header:
$msg->print_header(\*STDOUT);
### Send in the "best" way (the default is to use "sendmail"):
$msg->send;
-------------------
I am using ActivePerl on Windows. MIME::Lite has been installed.
Can someone please shed some light on the possible causes?
Thanks very much!
---------
use MIME::Lite;
### Create the multipart "container":
$msg = MIME::Lite->new(
From =>'XX@yahoo.com',
To =>'XX@hotmail.com',
Subject =>'A message with 2 parts...',
Type =>'multipart/mixed'
);
### Add the text message part:
### (Note that "attach" has same arguments as "new"):
$msg->attach(Type =>'TEXT',
Data =>"Here's the JPG file you wanted"
);
### Add the image part:
$msg->attach(Type =>'image/jpg',
Path =>'d:/test.jpg',
Filename =>'test.jpg',
Disposition => 'attachment'
);
### Format as a string:
$str = $msg->as_string;
### Write just the header:
$msg->print_header(\*STDOUT);
### Send in the "best" way (the default is to use "sendmail"):
$msg->send;
-------------------