Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Huỳnh Thiên Phước
venjob
Commits
9738679a
Commit
9738679a
authored
Aug 19, 2020
by
Huỳnh Thiên Phước
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create email sending
parent
c82beab1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
35 additions
and
27 deletions
+35
-27
app/mailers/application_mailer.rb
+1
-1
app/mailers/user_mailer.rb
+1
-1
app/views/layouts/_header.html.erb
+1
-1
app/views/user_mailer/register_email.html.erb
+4
-9
app/views/user_mailer/register_email.text.erb
+0
-4
app/views/users/mail_register.html.erb
+3
-0
config/environments/development.rb
+7
-6
config/environments/production.rb
+14
-1
config/environments/test.rb
+1
-1
config/local_env.yml.gitignore
+3
-3
No files found.
app/mailers/application_mailer.rb
View file @
9738679a
class
ApplicationMailer
<
ActionMailer
::
Base
class
ApplicationMailer
<
ActionMailer
::
Base
default
from:
'phuoc
ht@zigexn.vn
'
default
from:
'phuoc
2811006@gmail.com
'
layout
'mailer'
layout
'mailer'
end
end
app/mailers/user_mailer.rb
View file @
9738679a
class
UserMailer
<
ActionMailer
::
Base
class
UserMailer
<
ActionMailer
::
Base
def
register_email
(
email
)
def
register_email
(
email
)
@email
=
email
@email
=
email
mail
(
to:
@email
,
subject:
'Welcome
to My Awesome Site
'
)
mail
(
to:
@email
,
subject:
'Welcome
To VeNJOB! Confirm Your Email
'
)
end
end
end
end
app/views/layouts/_header.html.erb
View file @
9738679a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<nav>
<nav>
<ul
class=
"navbar-nav mr-auto"
>
<ul
class=
"navbar-nav mr-auto"
>
<li>
<%=
link_to
"Login"
,
'#'
,
class:
"nav-item nav-link"
%>
</li>
<li>
<%=
link_to
"Login"
,
'#'
,
class:
"nav-item nav-link"
%>
</li>
<li>
<%=
link_to
"Register"
,
'#'
,
class:
"nav-item nav-link"
%>
</li>
<li>
<%=
link_to
"Register"
,
register_begin_path
,
class:
"nav-item nav-link"
%>
</li>
<li>
<%=
link_to
"Favorite"
,
'#'
,
class:
"nav-item nav-link"
%>
</li>
<li>
<%=
link_to
"Favorite"
,
'#'
,
class:
"nav-item nav-link"
%>
</li>
<li>
<%=
link_to
"History"
,
'#'
,
class:
"nav-item nav-link"
%>
</li>
<li>
<%=
link_to
"History"
,
'#'
,
class:
"nav-item nav-link"
%>
</li>
</ul>
</ul>
...
...
app/views/user_mailer/register_email.html.erb
View file @
9738679a
...
@@ -3,14 +3,9 @@
...
@@ -3,14 +3,9 @@
<meta
content=
'text/html; charset=UTF-8'
http-equiv=
'Content-Type'
/>
<meta
content=
'text/html; charset=UTF-8'
http-equiv=
'Content-Type'
/>
</head>
</head>
<body>
<body>
<h1>
Welcome to example.com,
<%=
@email
%>
</h1>
<h1>
Welcome to
<%=
@email
%>
</h1>
<p>
<p>
You're on your way!
</p>
You have successfully signed up to example.com,
<p>
Let's confirm your email address.
</p>
your username is:
<%=
@email
%>
.
<br>
<p>
By clicking on the following link, you are confirming your email address and agreeing to VeNJOB's Terms of Service
</p>
.
</p>
<p>
To login to the site, just follow this link:....
</p>
<p>
Thanks for joining and have a great day!
</p>
</body>
</body>
</html>
</html>
app/views/user_mailer/register_email.text.erb
deleted
100644 → 0
View file @
c82beab1
=================================================
Welcome to example.com,
<%=
@email
%>
HELLO
app/views/users/mail_register.html.erb
View file @
9738679a
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
<strong>
Register
</strong>
<strong>
Register
</strong>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"text-center waiting-text"
>
</div>
Thank you for register our service, an confirmation email with registration link
<br>
Thank you for register our service, an confirmation email with registration link
<br>
has been sent to your email. Please check your email within 24 hours.
<br>
has been sent to your email. Please check your email within 24 hours.
<br>
Please note that the registration link is only valid for 24 hours.
<br>
Please note that the registration link is only valid for 24 hours.
<br>
...
...
config/environments/development.rb
View file @
9738679a
...
@@ -31,18 +31,19 @@ Rails.application.configure do
...
@@ -31,18 +31,19 @@ Rails.application.configure do
config
.
active_storage
.
service
=
:local
config
.
active_storage
.
service
=
:local
# Don't care if the mailer can't send.
# Don't care if the mailer can't send.
config
.
active_job
.
queue_adapter
=
:async
# config.active_job.queue_adapter = :async
config
.
action_mailer
.
default_url_options
=
{
host:
"localhost:3000"
}
# config.action_mailer.default_options = { from: 'support@venjob.com' }
# config.action_mailer.default_options = { from: 'support@venjob.com' }
config
.
action_mailer
.
default_options
=
{
from:
'phuoc2811006@gmail.com'
}
config
.
action_mailer
.
default_url_options
=
{
host:
"localhost:3000"
}
config
.
action_mailer
.
raise_delivery_errors
=
true
config
.
action_mailer
.
raise_delivery_errors
=
true
config
.
action_mailer
.
perform_deliveries
=
true
config
.
action_mailer
.
perform_deliveries
=
true
config
.
action_mailer
.
delivery_method
=
:smtp
config
.
action_mailer
.
delivery_method
=
:smtp
config
.
action_mailer
.
smtp_settings
=
{
config
.
action_mailer
.
smtp_settings
=
{
address:
"smtp.
zigexn.vn
"
,
address:
"smtp.
gmail.com
"
,
port:
587
,
port:
587
,
domain:
"
zigexn.vn
"
,
domain:
"
localhost:3000
"
,
user_name:
ENV
[
'GMAIL_USERNAME'
]
,
user_name:
"phuoc2811006@gmail.com"
,
password:
ENV
[
'GMAIL_PASSWORD'
]
,
password:
"Phuoc123"
,
authentication:
"plain"
,
authentication:
"plain"
,
enable_starttls_auto:
true
enable_starttls_auto:
true
}
}
...
...
config/environments/production.rb
View file @
9738679a
Rails
.
application
.
configure
do
Rails
.
application
.
configure
do
# Settings specified here will take precedence over those in config/application.rb.
# Settings specified here will take precedence over those in config/application.rb.
# config.action_mailer.default_options = { from: 'phuoc2811006@gmail.com' }
# config.action_mailer.default_url_options = { host: "localhost:3000" }
# config.action_mailer.raise_delivery_errors = true
# config.action_mailer.perform_deliveries = true
# config.action_mailer.delivery_method = :smtp
# config.action_mailer.smtp_settings = {
# address: "smtp.gmail.com",
# port: 587,
# domain: "localhost:3000",
# user_name: "phuoc2811006@gmail.com",
# password: "Phuoc123",
# authentication: "plain",
# enable_starttls_auto: true
# }
# Code is not reloaded between requests.
# Code is not reloaded between requests.
config
.
cache_classes
=
true
config
.
cache_classes
=
true
...
...
config/environments/test.rb
View file @
9738679a
Rails
.
application
.
configure
do
Rails
.
application
.
configure
do
# Settings specified here will take precedence over those in config/application.rb.
# Settings specified here will take precedence over those in config/application.rb.
# config.action_mailer.default_options = { from: 'phuoc2811006@gmail.com' }
# The test environment is used exclusively to run your application's
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# your test database is "scratch space" for the test suite and is wiped
...
...
config/local_env.yml
→
config/local_env.yml
.gitignore
View file @
9738679a
...
@@ -6,6 +6,6 @@
...
@@ -6,6 +6,6 @@
# For example, setting:
# For example, setting:
# GMAIL_USERNAME: 'Your_Gmail_Username'
# GMAIL_USERNAME: 'Your_Gmail_Username'
# makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"]
# makes 'Your_Gmail_Username' available as ENV["GMAIL_USERNAME"]
GMAIL_USERNAME
:
'
phuocht@zigexn.vn'
#
GMAIL_USERNAME: 'phuocht@zigexn.vn'
GMAIL_PASSWORD
:
'
Thienphuoc
123'
# GMAIL_PASSWORD: 'Thienphuoc0
123'
# PASSWORD_TPM: '
vjkjlbgoxqxvnbac
'
# PASSWORD_TPM: '
xaxxfxobotthglsm
'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment