Don't forget to post to list and not just the orginal sender!!
> 
> Dan:
> 
> except that I ran the same script on my local linux box and
> got a similar error regarding headers:
> 
> [Wed Jan 29 09:44:52 2003] [error] [client 192.168.0.202]
> malformed header from script. Bad [EMAIL PROTECTED]: 
> /var/www/cgi-b in/test/test.cgi.

Copy the line that has the $to line in it and send it here.

> 
> Same code that I'm trying to run on the server.
> 
> -----Original Message-----
> From: Dan Muey [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 29, 2003 11:18 AM
> To: Ron Geringer
> Subject: RE: Need help
> 
> 
> 
> 
> >
> > Dan:
> >
> > you are right - I could have been a little clearer.
> >
> > Here's the actual error from the log that I get when I run
> the script:
> >
> > qmail-inject: fatal: unable to parse this line:
> > Reply-to: [EMAIL PROTECTED]: Confirmation of your
> > [EMAIL PROTECTED]: text/plain
> > [Wed Jan 29 12:05:44 2003] [error] [client 68.13.40.38] malformed
> > header from script. Bad [EMAIL PROTECTED]
> 
> If you're using qmail it would be better to have the
> qmail-inject path instead of sendmail which is probably a sym 
> link to qmail-inject.
> 
> To open a pipe to qmail-inject you need
> /var/qmail/bin/qmail-inject -f $to_address
> 
> Which means you'll have to modify the open statement to use that.
> 
> Do you know what the -i and -t options do for qmail-inject?
> 
> See you're trying to use sendmail's switches with qmail, do
> they work, have the same options, probably not.
> 
> Could be those switches are causing the bad header becaue
> what they do in sendmail could be totally different than 
> qmail. That is why it's best to use a module or at least use 
> the right program/options.
> 
> Dan
> 
> >
> > Ron
> >
> > -----Original Message-----
> > From: Dan Muey [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 29, 2003 10:56 AM
> > To: Ron Geringer; [EMAIL PROTECTED]
> > Subject: RE: Need help
> >
> >
> > > I'm pretty much used to scripting sendmail applications in
> > tcl - and
> > > I'm very new to perl so this may be a dumb question. I'm
> > working with
> > > a sendmail script that I got off the internet. The script
> that I'm
> > > working with is listed below:
> > >
> > > #!/usr/bin/perl
> > > use CGI;
> > >
> > > my $query    = new CGI;
> > > my $sendmail = "/usr/sbin/sendmail -i -t";
> > > my $reply_to = "Reply-to: geringer2\@cox.net";
> > > my $subject  = "Subject: Confirmation of your submission"; my
> > > $content  = "Thanks for your submission.";
> > > my $to       = $query->param('send_to');
> > > my $file     = "subscribers2.txt";
> > >
> > > unless ($to) {
> > >    print $query->header;
> > >    print "Please fill in your email and try again";
> > > }
> > >
> > > open (FILE, ">>$file") or die "Cannnot open $file: $!"; print
> > > $to,"\n"; close(FILE);
> > >
> > > my $send_to  = "To: ".$query->param('send_to');
> > >
> > > open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail:
> > $!"; print
> > > SENDMAIL $reply_to; print SENDMAIL $subject; print SENDMAIL
> > $to; print
> > > SENDMAIL "Content-type: text/plain\n\n"; print SENDMAIL $content;
> > > close(SENDMAIL);
> > >
> > > print $query->header;
> > > print "Confirmation of your submission will be emailed to
> you."; ~ ~
> > >
> > > --------------------------------------
> > >
> > > The only difference between this and the one I found is
> the "\" in
> > > fron of the "@". When I run this cript - the error that I'm
> > seeing  is
> > > that the header is malformed.
> >
> > If what you're trying to get help on is the malformed header error 
> > then this is probably the problem :
> >
> > You should need to do \@ if you're using double quotes,
> shouldn't need
> > if you use single quotes.
> >
> > Did having that ( the \ in front of the @ ) cause the
> error? Could you
> > be less ambiguous about the problem, is the problem the 'header
> > malformed' error or you can't send mail or ...? What 
> happens when you
> > run it form the command line?
> >
> > You might want to look into a module, they're much easier
> to work with
> > and portable. The one I started working wioth lately is : 
> > http://search.cpan.org/author/JENDA/Mail-Sender-0.8.04/Sender.
> pm
> 
> Or search cpan and find one you like/does what you want and
> you'll probably
> on ly need a few lines of code to do what you want.
> 
> Dan
> 
> >
> > If anyone can tell me what I did wrong - I would appreciate it.
> >
> > What I'm trying to do is put a perl script on a server
> which will take
> > data from an html document and redirect it to an email
> address. Once I
> > get one to work, I'm confident that I can make
> modifications and work
> > with it (testing etc), to better understand how perl makes it works.
> >
> > I would really appreciate any help I can get.
> >
> >
> > --
> > 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]

Reply via email to