mailjet mailers
This commit is contained in:
@ -14,8 +14,8 @@ class OauthsController < ApplicationController
|
||||
else
|
||||
begin
|
||||
@user = create_from(provider)
|
||||
# NOTE: this is the place to add '@user.activate!'
|
||||
# if you are using user_activation submodule
|
||||
# NOTE: this is the place to add '@user.activate!' if you
|
||||
# are using user_activation submodule
|
||||
|
||||
reset_session # protect from session fixation attack
|
||||
auto_login(@user)
|
||||
|
6
app/mailers/account_mailer.rb
Normal file
6
app/mailers/account_mailer.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class AccountMailer < ApplicationMailer
|
||||
def activation_needed
|
||||
@blarg = "This was blarg"
|
||||
mail(to: 'markamoser+test@gmail.com', subject: 'Activate me please!')
|
||||
end
|
||||
end
|
4
app/mailers/application_mailer.rb
Normal file
4
app/mailers/application_mailer.rb
Normal file
@ -0,0 +1,4 @@
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
default from: ENV['default_mail_from']
|
||||
layout 'mailer'
|
||||
end
|
4
app/views/account_mailer/activation_needed.html.haml
Normal file
4
app/views/account_mailer/activation_needed.html.haml
Normal file
@ -0,0 +1,4 @@
|
||||
!!!
|
||||
%h3 Activate me please
|
||||
|
||||
%p and then: #{@blarg}
|
3
app/views/layouts/mailer.html.haml
Normal file
3
app/views/layouts/mailer.html.haml
Normal file
@ -0,0 +1,3 @@
|
||||
%hmtl
|
||||
%body
|
||||
= yield
|
1
app/views/layouts/mailer.text.haml
Normal file
1
app/views/layouts/mailer.text.haml
Normal file
@ -0,0 +1 @@
|
||||
= yield
|
Reference in New Issue
Block a user