Thank you so much. You're absolutely right; when I put in: "Data =>'', " it worked perfectly.
Now that I know the answer, I do note that in the MIME::Lite documentation, Data, FH and Path are the only parameters not marked "Optional." <grouse>I wish they had made this more explicit, with a line like "Either Data, FH or Path must be specified in a message, even if it is null."</grouse> Thanks, again, for writing. -Kevin >>> "Jenda Krynicky" <[EMAIL PROTECTED]> 03/26/02 06:10PM >>> From: "KEVIN ZEMBOWER" <[EMAIL PROTECTED]> > I hope it's okay to ask a question here regarding MIME::Lite. This is > a fairly well-used module, that even beginners might run up against. > Additionally, I suspect my problem doesn't have to do so much with > MIME::Lite, as it does with more general topics. > > I'm writing a CGI program to take input from a form and control an > EZMLM mailing list (using qmail as the MTA). The section giving me > problems is: if ($q->param('sub')) { > ($address = $q->param('email')) =~ s/\@/=/; > $msg = MIME::Lite->new( > From =>'rhgnews-subscribe-' . $address . > '@lists.rhgateway.org', > To =>'[EMAIL PROTECTED]' > ); # end of message > $tmp = $msg->as_string; > print " Message string: $tmp <p>"; > $msg->send; > print "$q->param('email') has been sucessfully subscribed.<p>"; > } #if this is a subscription > > When I run my program, it executes normally, but then ends with "no > data in this part at ./rhgnewsadmin.pl line 23." Line 23 is "$tmp = > $msg->as_string;". If it's missing, I get the same error with > "$msg->send;" The program ends at this point, and doesn't proceed with > the code I've written to output some more HTML stuff. > > Any yet, oddly enough, the message is sent properly, and I receive it. I think you should specify the message body even if it is an empty string. Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]