-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c5466e
commit 6d6445d
Showing
4 changed files
with
339 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
class UserMailer < ApplicationMailer | ||
def welcome | ||
@user_name = params[:user_name] | ||
@body_text = params[:body_text] | ||
@button_label = params[:button_label] | ||
mail(to: "[email protected]", subject: "Welcome") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,49 @@ | ||
<h1>hello <%= @user_name %></h1> | ||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body"> | ||
<tr> | ||
<td> </td> | ||
<td class="container"> | ||
<div class="content"> | ||
<span class="preheader">This is preheader text. Some clients will show this text as a preview.</span> | ||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="main"> | ||
<tr> | ||
<td class="wrapper"> | ||
<p>Hi <%= @user_name %>,</p> | ||
<p><%== sanitize(@body_text.gsub("\n", "<br>")) %></p> | ||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary"> | ||
<tbody> | ||
<tr> | ||
<td align="left"> | ||
<table role="presentation" border="0" cellpadding="0" cellspacing="0"> | ||
<tbody> | ||
<tr> | ||
<td> <a href="" target="_blank"><%= @button_label %></a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<div class="footer"> | ||
<table role="presentation" border="0" cellpadding="0" cellspacing="0"> | ||
<tr> | ||
<td class="content-block"> | ||
Don't like these emails? <a href="#">Unsubscribe</a>. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="content-block powered-by"> | ||
<small>Template sourced from <a href="https://github.com/leemunroe/responsive-html-email-template">@leemunroe</a></small> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</div> | ||
</td> | ||
<td> </td> | ||
</tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters