Skip to content

Commit

Permalink
Add mailcheck file
Browse files Browse the repository at this point in the history
  • Loading branch information
Slivo-fr committed Nov 10, 2017
1 parent 02d356d commit 8bff72f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions AlertHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public static function sendAlertMail(Exception $e) {


if ($mailer->send($message)) {
echo "Alert mail sent\n";
echo 'Alert mail sent' . PHP_EOL;
} else {
echo "Failed to send alert mail\n";
echo 'Failed to send alert mail' . PHP_EOL;
}
}
protected static function generateBody(Exception $e)
Expand Down
2 changes: 1 addition & 1 deletion cron.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

set_error_handler(function($code, $message, $file, $line) {
echo $message . "\n";
echo $message . PHP_EOL;
throw new ErrorException($message, 0, $code, $file, $line);
});

Expand Down
8 changes: 8 additions & 0 deletions mailcheck.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

require_once ('vendor/autoload.php');

use Killbot\AlertHandler;

AlertHandler::sendAlertMail(new Exception('This is a test error message'));

0 comments on commit 8bff72f

Please sign in to comment.