in reply to Re: mime::lite problem
in thread mime::lite problem

I'm not exactly sure which parts to substitute in your code. Here is my code, which has partially worked, as I've noted, but not as I wish. Earlier in the script, I am opening filehandles, and writing them to .txt files to create the attachments (i.e.):
open (ORDER_DATA, ">$order_dir/temp_order.txt") || die "Can't open $or +der_dir/temp_order.txt!\n"; select (ORDER_DATA); &print_form; select (STDOUT); close (ORDER_DATA); Then, here is the mime::lite section: ### Create the multipart "container": $msg = MIME::Lite->new( From =>$FORM{"email"}, To =>$recipient, Subject =>"STI Document Order $FORM{ORDER_NUMBER} +", Type =>'multipart/mixed'); $msg->attach(Path =>"$order_dir/temp_order.txt"); ### Add the attachment: $msg->attach(Path =>"$order_dir/temp_order_attach.txt", Disposition =>'attachment'); $text = $msg->as_string; $msg->send($mailprog);
Can you tell me the best way to adapt the (ARGV[0], and $fh parts of your code to mine, so I can make this work using my .txt files?