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 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]