Initial commit Change-Id: I0000000000000000000000000000000000000000
This commit is contained in:
34
classes/email.php
Executable file
34
classes/email.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
require_once('conf.php');
|
||||
|
||||
/*
|
||||
Generates and sends a email to notify devs of a new or updated exception report
|
||||
*/
|
||||
function reportEmail($app, $version, $msg, $status, $id){
|
||||
$companyEmail = EMAIL;
|
||||
$url = REPORT_URL;
|
||||
|
||||
$email = <<<EMAIL
|
||||
|
||||
$app $version has generated the following exception:
|
||||
|
||||
$msg
|
||||
|
||||
$url$id
|
||||
|
||||
This email was generated by the Twenty Codes, LLC Exception Handler.
|
||||
EMAIL;
|
||||
|
||||
mail( 'arsenickiss7891@gmail.com' , "$status excpetion report for $app $version" , $email, "From: Exception Handler" );
|
||||
|
||||
/*
|
||||
The following was used if mail() doesnt work. This method seems to be problematic
|
||||
$temp = fopen("/exceptionhandler/email", 'w');
|
||||
fwrite($temp, $email);
|
||||
fclose($temp);
|
||||
shell_exec("ssmtp -t < /exceptionhandler/email");
|
||||
unlink("/exceptionhandler/email");
|
||||
*/
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user