- Miller#!/usr/bin/perl use CGI; use strict; use warnings; my $query = new CGI; my $sendmail = "/usr/sbin/sendmail -t"; my $reply_to = q{vidhu4000@yahoo.com}; my $to = q{vidhu4000@yahoo.com}; my $subject = q{Confirmation of your submission}; my $content = "Thanks for your submission."; # Log Subscription my $subscriptions = "../output/tmp/subscribers.txt"; open(SUBSCRIPTIONS, ">>$subscriptions") or die "Cannot open $subscript +ions: $!"; print SUBSCRIPTIONS $to."\n"; close(SUBSCRIPTIONS); # Send Confirmation Email open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"; print SENDMAIL <<"END_MAIL"; Reply-to: $reply_to Subject: $subject To: $to Content-type: text/plain $content END_MAIL close(SENDMAIL) or warn "sendmail didn't close nicely"; # HTML Confirmation print $query->header; print "Confirmation of your submission will be emailed to you.";
In reply to Re: sendmail not sending email...please help
by wind
in thread sendmail not sending email...please help
by advait
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |