Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Add welcome message email after sign up
- Loading branch information
Showing
4 changed files
with
33 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class UserMailer < ActionMailer::Base | ||
default from: "no-reply@example.com" | ||
|
||
def welcome_email(user) | ||
@user = user | ||
@url = "http://localhost:3000/sign_in" | ||
mail(:to => user.email, :subject => "Welcome blogger!") | ||
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> | ||
</head> | ||
<body> | ||
<h1>Welcome to example.com, blogger.</h1> | ||
<p> | ||
To login to the site, just follow this link: <%= @url %>. | ||
</p> | ||
<p>Thanks for joining and have a great day!</p> | ||
</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,6 @@ | ||
Welcome to example.com, blogger | ||
=============================================== | ||
|
||
To login to the site, just follow this link: <%= @url %>. | ||
|
||
Thanks for joining and have a great day! |