Please enter a valid email address (ex. user@domain.com).';
}
else
{
include("libmail.php");
$m= new Mail; // create the mail
$m->From( "pdill@dal.ca" );
$m->To( $email );
$m->Subject( "The article you requested from Raymond Klein" );
$m->Body( "Attached you will find the article you requested:\n\n".$articles[$articleid][3]."\n\nRegards,\nRaymond Klein"); // set the body
$m->Priority(3) ; // set the priority to normal
$m->Attach( $articles[$articleid][2], "application/pdf", "inline" ) ; // attach a file of type pdf to be displayed in the message if possible
$m->Send(); // send the mail
$logfile ="log.txt";
$log= fopen($logfile,'a');
$articlename = $articles[$articleid][2];
$day = date("m/d/y h:i A");
fputs($log, "$day\t$email\t$articlename\n");
fclose($log);
// Print the thank you message
echo "Thank you!
The following article has been sent to $email:
".$articles[$articleid][3]."
";
echo "Click here to go back to Raymond Klein's web page
";
}
}
// Valid ID, but no e-mail
else if(isset($HTTP_GET_VARS["articleid"]))
{
$articleid = $HTTP_GET_VARS["articleid"];
include("emailform.php");
}
else
{
// List all the articles in order by year then name
echo "";
?>
Articles
To request a PDF of the full length text, please click on any item below.
" . $value[3] . "\n";
else
echo "" . $value[3] . "
\n";
}
}
include("footer.html");
?>