forked from remoteoss/swoosh_gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add real content to sample emails and a screenshot to README
- Loading branch information
1 parent
60fa960
commit 6b33f92
Showing
9 changed files
with
125 additions
and
19 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -5,11 +5,11 @@ defmodule Sample.Mailer.Notifications.NewFollowerMailer do | |
new() | ||
|> from("[email protected]") | ||
|> to({user.name, user.email}) | ||
|> subject("Great!, #{follower.name} is following you") | ||
|> subject("Great! #{follower.name} is following you") | ||
|> render_body("new_follower.html", user: user, follower: follower) | ||
end | ||
|
||
def preview, do: welcome(%{email: "[email protected]", name: "Test User!"}, %{name: "The Follower"}) | ||
def preview, do: welcome(%{email: "[email protected]", name: "Test User!"}, %{name: "Another User"}) | ||
|
||
def preview_details do | ||
[ | ||
|
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 |
---|---|---|
|
@@ -5,15 +5,15 @@ defmodule Sample.Mailer.UserMailer do | |
new() | ||
|> from("[email protected]") | ||
|> to({user.name, user.email}) | ||
|> subject("Welcome to Sample App") | ||
|> subject("Welcome to Sample App!") | ||
|> render_body("welcome.html", user: user) | ||
end | ||
|
||
def preview, do: welcome(%{email: "[email protected]", name: "Test User!"}) | ||
def preview, do: welcome(%{email: "[email protected]", name: "Test User"}) | ||
|
||
def preview_details do | ||
[ | ||
title: "Welcome to Sample", | ||
title: "Welcome Email", | ||
description: "First email to welcome users into the platform" | ||
] | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Great! <%= @follower.name %> is following you</title> | ||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"> </head> | ||
|
||
<body> | ||
<div class="flex items-center justify-center py-32 p-5 bg-blue-100 min-w-screen"> | ||
<div class="max-w-xl p-8 text-center text-gray-800 bg-white shadow-xl rounded-2xl"> | ||
<h3 class="text-2xl"><%= @follower.name %> is now following you!</h3> | ||
<div class="flex justify-center"> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="w-24 h-24 text-green-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" /> | ||
</svg> | ||
</div> | ||
<p> | ||
Hey <%= @user.name %>, this is only a head's up that <%= @follower.name %> is now following your posts | ||
</p> | ||
<p class="mt-4"> | ||
<a class="inline-block px-6 py-2.5 bg-blue-600 text-white font-medium rounded shadow-md">Click bere to see their feed</a> | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>You have a new message</title> | ||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"> | ||
</head> | ||
<body> | ||
<div class="flex items-center justify-center py-32 p-5 bg-blue-100 min-w-screen"> | ||
<div class="max-w-xl p-8 text-center text-gray-800 bg-white shadow-xl rounded-2xl"> | ||
<h3 class="text-2xl">You got mail</h3> | ||
<div class="flex justify-center"> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="w-24 h-24 text-green-400" viewBox="0 0 20 20" fill="currentColor"> | ||
<path d="M8.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l2-2a1 1 0 00-1.414-1.414L11 7.586V3a1 1 0 10-2 0v4.586l-.293-.293z" /> | ||
<path d="M3 5a2 2 0 012-2h1a1 1 0 010 2H5v7h2l1 2h4l1-2h2V5h-1a1 1 0 110-2h1a2 2 0 012 2v10a2 2 0 01-2 2H5a2 2 0 01-2-2V5z" /> | ||
</svg> | ||
</div> | ||
<p>Hey <%= @user.name %>, you have a new message</p> | ||
<p class="mt-4"> | ||
<a class="inline-block px-6 py-2.5 bg-blue-600 text-white font-medium rounded shadow-md">Click here to read it</a> | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
28 changes: 27 additions & 1 deletion
28
sample/lib/sample_web/templates/user_mailer/download.html.eex
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,27 @@ | ||
<p>Hey <%= @user.name %>, here is the file you asked</p> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>You download is ready</title> | ||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"> | ||
</head> | ||
<body> | ||
<div class="flex items-center justify-center py-32 p-5 bg-blue-100 min-w-screen"> | ||
<div class="max-w-xl p-8 text-center text-gray-800 bg-white shadow-xl rounded-2xl"> | ||
<h3 class="text-2xl">You download is ready</h3> | ||
<div class="flex justify-center"> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="w-24 h-24 text-green-400" viewBox="0 0 20 20" fill="currentColor"> | ||
<path fill-rule="evenodd" d="M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" /> | ||
</svg> | ||
</div> | ||
<p>Hey <%= @user.name %>, here is the file you asked</p> | ||
<p class="mt-4"> | ||
<a class="inline-block px-6 py-2.5 bg-blue-600 text-white font-medium rounded shadow-md">Click to download</a> | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
23 changes: 21 additions & 2 deletions
23
sample/lib/sample_web/templates/user_mailer/welcome.html.eex
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,3 +1,22 @@ | ||
<h1>Welcome to Sample, <%= @user.name %>!</h1> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<p>This is a sample email that is delivered when a person first join the platform.</p> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Welcome!</title> | ||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"> | ||
</head> | ||
<body> | ||
<div class="flex items-center justify-center py-32 p-5 bg-blue-100 min-w-screen"> | ||
<div class="max-w-xl p-8 text-center text-gray-800 bg-white shadow-xl rounded-2xl"> | ||
<h3 class="text-2xl">Welcome to Sample, <%= @user.name %>!</h3> | ||
<p class="mt-4">This is a sample email that is delivered when a person first join the platform.</p> | ||
<p class="mt-4"> | ||
<a class="inline-block px-6 py-2.5 bg-blue-600 text-white font-medium rounded shadow-md">Get started with the app</a> | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |