in reply to sendmail not sending email...please help

Refactoring your code to model after perlfaq9 How do I send mail?
#!/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.";
- Miller

Replies are listed 'Best First'.
Re^2: sendmail not sending email...please help
by advait (Beadle) on Jul 12, 2007 at 13:30 UTC
    This is also not working. I am running the script on ubuntu. I have already installed the sendmail but I might need some other changes in settings...any suggestions?
      Someone is giving error message, find it out