diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-06-13 11:49:34 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-06-13 11:49:34 +0100 |
commit | 3472be35b5f6b896f51fe95f6001be648e0ec628 (patch) | |
tree | 745f54ba6a6eb36a2c7ae5df2f28e1ef7dc113da /lib/mauve/notifiers/templates | |
parent | 225b95902103d5849404639e68c5ec1f450c464d (diff) |
Updated email alert to send a sane subject, and valid HTML.
Diffstat (limited to 'lib/mauve/notifiers/templates')
-rw-r--r-- | lib/mauve/notifiers/templates/email.html.erb | 22 | ||||
-rw-r--r-- | lib/mauve/notifiers/templates/email.txt.erb | 2 |
2 files changed, 9 insertions, 15 deletions
diff --git a/lib/mauve/notifiers/templates/email.html.erb b/lib/mauve/notifiers/templates/email.html.erb index fcf0620..c568d77 100644 --- a/lib/mauve/notifiers/templates/email.html.erb +++ b/lib/mauve/notifiers/templates/email.html.erb @@ -1,4 +1,7 @@ -<p><strong><%= alert.update_type.upcase %></strong> <% +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><head><title></title></head><body> +<p><strong><%= alert.update_type.upcase %>:</strong> <% case alert.update_type when :cleared %><%= MauveTime.now.to_s_relative(alert.cleared_at.to_time) %><% @@ -11,18 +14,9 @@ end if alert.source != alert.subject %> -- <em>from <%= alert.source %></em><% end -%>. - +%>.</p> <hr /> - -<div> -<%=alert.detail %> -</div> - +<h2>Detail</h2> +<div><%=alert.detail %></div> <hr /> - -<address> ---<br /> -Love mauve<br /> -xxx. -</address> +<address>--<br />Love mauve<br />xxx.</address></body></html> diff --git a/lib/mauve/notifiers/templates/email.txt.erb b/lib/mauve/notifiers/templates/email.txt.erb index 8f7e9a4..eb49da9 100644 --- a/lib/mauve/notifiers/templates/email.txt.erb +++ b/lib/mauve/notifiers/templates/email.txt.erb @@ -13,7 +13,7 @@ if alert.source != alert.subject end %>. --- Details ------------------------------------------------------------ +-- Detail ------------------------------------------------------------ <%= Sanitize.clean(alert.detail) %> |