. */ class email_results extends pts_module_interface { const module_name = "E-Mail Results"; const module_version = "0.1.0"; const module_description = "This is a module that will email the test results to an individual with the recipient email address being set in the EMAIL_RESULTS_TO environmental variable."; const module_author = "Michael Larabel"; public static function __post_option_process($process) { if(($buffer = pts_text_save_buffer($to_add)) != null && getenv("EMAIL_RESULTS_TO") != FALSE && $process == "run_test") { $email_to = trim(getenv("EMAIL_RESULTS_TO")); $email_contents .= "This e-mail was automatically generated by the Phoronix Test Suite with the email_results module.\n"; $email_contents .= pts_string_header("Phoronix Test Suite v" . PTS_VERSION . " (" . PTS_CODENAME . ")"); $email_contents .= pts_hw_string() . "\n\n"; $email_contents .= pts_sw_string() . "\n"; $email_contents .= $buffer; $email_contents = wordwrap($email_contents, 70); @mail($email_to, "Phoronix Test Suite - Test Results", $email_contents); } } } ?>