Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add html email for mailer template

  • Loading branch information...
commit 00d0c2d2977c6b579f5113a7fa2899555e01c917 1 parent 651d374
@rociiu rociiu authored
Showing with 184 additions and 23 deletions.
  1. +85 −23 app/views/notification_mailer/upgrades.html.erb
  2. +99 −0 doc/email.html
View
108 app/views/notification_mailer/upgrades.html.erb
@@ -1,26 +1,88 @@
-<p>
- Hello <b><%= @user.name %></b>
-</p>
-<div>
- <h4>Here is gems that got upgraded this week:</h4>
- <ul>
- <% @notifications.each do |notification| %>
- <li>
- <%= link_to notification.gem_item.name, url_for(:controller => 'gem_items', :action => 'show', :id => notification.gem_item.name, :host => 'gemnotifier.org') %> (<%= notification.version %>)
- </li>
- <% end %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- </ul>
-</div>
+ <title>GemNotifier + Updates</title>
+ <style type="text/css">
+ /* Client-specific Styles */
+ #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */
+ body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
+ body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */
+ /* Reset Styles */
+ body{margin:0; padding:0;}
+ img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}
+ table td{border-collapse:collapse;}
+ #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;}
-<br/>
-<br/>
-<br/>
-<br/>
-<br/>
-<p>
- <a href="http://gemnotifier.org">Gemnotifier</a> <span>( Brought to you by <a href="http://intridea.com">intridea.com</a>)</span>
- <br/>
- <a href="http://intridea.com"><img src="http://gemnotifier.org/images/gemnotifier_incubator.png"/></a>
-</p>
+ body, #backgroundTable{
+ background-color: #F0F8FB;
+ font-family:Arial;
+ color: #333;
+ }
+ #header {
+ background-color: #4f8ca9;
+ color: #333;
+ }
+ a {
+ color: #EF4300;
+ }
+ </style>
+ </head>
+ <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="background-color: #F0F8FB;">
+ <center>
+ <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable">
+ <tr>
+ <td align="center" valign="top">
+ <table border="0" cellpadding="10" cellspacing="0" width="600" style="border: 1px solid #ddd; background-color: #fff;">
+ <tr>
+ <td valign="top" class="preheaderContent">
+ <table border="0" cellpadding="10" cellspacing="0" width="100%" id="header" style="background-color: #4f8ca9;">
+ <tr>
+ <td valign="top">
+ <a href="http://gemnotifier.org"><img src="http://gemnotifier.org/images/gemnotifier_logo.png" /></a>
+ </td>
+ </tr>
+ </table>
+ <table border="0" cellpadding="10" cellspacing="0" width="100%">
+ <tr>
+ <td>
+ Hi <b><%= @user.name %></b>, <br/><br/>
+ Here is gems you subscribed got upgraded recently:
+ </td>
+ </tr>
+ </table>
+ <table border="0" cellpadding="10" cellspacing="0" width="100%">
+ <% @notifications.each do |notification| %>
+ <tr>
+ <td>
+ <a href="<%= url_for(:controller => 'gem_items', :action => 'show', :id => notification.gem_item.name, :host => 'gemnotifier.org') %>"><%= notification.gem_item.name %></a>
+ </td>
+ <td style="font-weight: bold;">
+ <%= notification.version %>
+ </td>
+ </tr>
+ <% end %>
+ </table>
+ <table border="0" cellpadding="10" cellspacing="0" width="100%" style="border-top: 1px solid #30708e; margin-top: 15px;">
+ <tr>
+ <td>
+ Thanks <br>
+ <a href="http://gemnotifier.org">Gemnotifier.org</a> ( Brought to you by <a href="http://intridea.com">intridea.com</a>)
+ <br/>
+ <a href="http://intridea.com"><img src="http://gemnotifier.org/images/gemnotifier_incubator.png"/></a>
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </body>
+</html>
View
99 doc/email.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+
+ <title>GemNotifier + Updates</title>
+ <style type="text/css">
+ /* Client-specific Styles */
+ #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */
+ body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
+ body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */
+
+ /* Reset Styles */
+ body{margin:0; padding:0;}
+ img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}
+ table td{border-collapse:collapse;}
+ #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;}
+
+ body, #backgroundTable{
+ background-color: #F0F8FB;
+ font-family:Arial;
+ color: #333;
+ }
+ #header {
+ background: #4f8ca9;
+ color: #333;
+ }
+ a {
+ color: #EF4300;
+ }
+ </style>
+ </head>
+ <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
+ <center>
+ <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable">
+ <tr>
+ <td align="center" valign="top">
+ <table border="0" cellpadding="10" cellspacing="0" width="600" style="border: 1px solid #ddd; background-color: #fff;">
+ <tr>
+ <td valign="top" class="preheaderContent">
+ <table border="0" cellpadding="10" cellspacing="0" width="100%" id="header">
+ <tr>
+ <td valign="top">
+ <a href="http://gemnotifier.org"><img src="http://gemnotifier.org/images/gemnotifier_logo.png" /></a>
+ </td>
+ </tr>
+ </table>
+ <table border="0" cellpadding="10" cellspacing="0" width="100%">
+ <tr>
+ <td>
+ Hi Roc Yu, <br/><br/>
+ Here is gems you subscribed got upgraded recently:
+ </td>
+ </tr>
+ </table>
+ <table border="0" cellpadding="10" cellspacing="0" width="100%">
+ <tr>
+ <td>
+ <a href="http://gemnotifier.org/gem/rails">Rails</a>
+ </td>
+ <td style="font-weight: bold;">
+ 0.5.1
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="http://gemnotifier.org/gem/rails">Rails</a>
+ </td>
+ <td style="font-weight: bold;">
+ 0.5.1
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="http://gemnotifier.org/gem/rails">Rails</a>
+ </td>
+ <td style="font-weight: bold;">
+ 0.5.1
+ </td>
+ </tr>
+ </table>
+ <table border="0" cellpadding="10" cellspacing="0" width="100%" style="border-top: 1px solid #30708e; margin-top: 15px;">
+ <tr>
+ <td>
+ Thanks <br>
+ <a href="http://gemnotifier.org">Gemnotifier.org</a> ( Brought to you by <a href="http://intridea.com">intridea.com</a>)
+ </td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.