diff --git a/PHPCI/Plugin/Email.php b/PHPCI/Plugin/Email.php
index 81671e1c..77f884e3 100644
--- a/PHPCI/Plugin/Email.php
+++ b/PHPCI/Plugin/Email.php
@@ -9,6 +9,7 @@
namespace PHPCI\Plugin;
+use b8\View;
use PHPCI\Builder;
use PHPCI\Model\Build;
@@ -84,10 +85,16 @@ class Email implements \PHPCI\Plugin
sprintf("Log Output:
%s", $logText) ); } else { + $view = new View('Email/failed'); + $view->build = $this->build; + $view->project = $this->build->getProject(); + + $emailHtml = $view->render(); + $sendFailures = $this->sendSeparateEmails( $addresses, sprintf($subjectTemplate, $projectName, "Failing Build"), - sprintf("Log Output:
%s", $logText) + $emailHtml ); } diff --git a/PHPCI/View/Email/failed.phtml b/PHPCI/View/Email/failed.phtml new file mode 100644 index 00000000..752208dd --- /dev/null +++ b/PHPCI/View/Email/failed.phtml @@ -0,0 +1,13 @@ +
Your commit = $build->getCommitId(); ?> caused a failed build in project = $project->getTitle(); ?>.
+ +Please review your commit and the build log.
+