advait has asked for the wisdom of the Perl Monks concerning the following question:
#!/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.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sendmail not sending email...please help
by wind (Priest) on Jul 11, 2007 at 22:25 UTC | |
by advait (Beadle) on Jul 12, 2007 at 13:30 UTC | |
by Anonymous Monk on Jul 16, 2007 at 06:09 UTC | |
|
Re: sendmail not sending email...please help
by almut (Canon) on Jul 11, 2007 at 21:44 UTC | |
by advait (Beadle) on Jul 12, 2007 at 13:31 UTC |