I have developed a database with the use of Perl CGI with C++. I have problem in sending the results to mail. I used the following code:
print LOG "[",`date`,"] Sending mail to $email\n";
system (qq{mutt -s "MMM" -a $zip_file $email < $job_id});
if ( $? == 0) {
print LOG "[",`date`,"] Sending mail to $email :: SUCCESS ::\n";
}else {
print LOG "[",`date`,"] Sending mail to $email :: FAILED ::\n";
}
close LOG;