#!/usr/bin/perl use CGI; my $query = new CGI; my $sendmail = "/usr/sbin/sendmail -t"; my $reply_to = "Reply-to: vidhu4000\@yahoo.com\n"; my $subject = "Subject: Confirmation of your submission\n"; my $content = "Thanks for your submission."; my $to = "vidhu4000\@yahoo.com"."\n"; my $file = "../output/tmp/subscribers.txt"; open (FILE, ">>$file") or die "Cannot open $file: $!"; print FILE $to."\n"; close(FILE); my $send_to = "To: vidhu4000\@yahoo.com"; open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"; print SENDMAIL $reply_to; print SENDMAIL $subject; print SENDMAIL $send_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.";