diff --git a/pmd-web/src/webpmd.pl b/pmd-web/src/webpmd.pl index 743915e6bc..54614fd3ca 100644 --- a/pmd-web/src/webpmd.pl +++ b/pmd-web/src/webpmd.pl @@ -100,12 +100,21 @@ sub loadProjectList() { } sub addProject() { - my ($project) = @_; - my $cmd = "echo \"@{[$project->getString()]}\" > @{[$project->getJobsFile()]}"; - eval { - # for some reason this succeeds, but the CGI script fails. Very odd. - `${cmd}`; - } + my ($project) = @_; + #my $cmd = "echo \"@{[$project->getString()]}\" > @{[$project->getJobsFile()]}"; + #my $cmd = "mail tomcopeland@users.sourceforge.net -s \"@{[$project->getString()]}\""; + #system("${cmd}"); + open(SENDMAIL, "|/usr/lib/sendmail -oi -t -odq") or die "Couldn't send email: $!\n"; + print SENDMAIL <<"EOF"; +From: PMD-WEB +To: Tom Copeland +Subject: @{[$project->getString()]} + +enter it + +EOF + + close(SENDMAIL) or warn "Sendmail didn't close nicely"; } $page=param("state") || "default";