start on news mailer
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
default from: "info@hubfeenix.fi" , bcc: "info@hubfeenix.fi"
|
||||
layout "mailer"
|
||||
|
||||
end
|
||||
|
@ -1,7 +1,7 @@
|
||||
class FormMailer < ApplicationMailer
|
||||
default from: "info@hubfeenix.fi" , bcc: "info@hubfeenix.fi"
|
||||
|
||||
def received(data)
|
||||
def received(data )
|
||||
@data = data
|
||||
mail(to: data['Email'] , subject: "We have received your request")
|
||||
end
|
||||
|
22
app/mailers/news_mailer.rb
Normal file
22
app/mailers/news_mailer.rb
Normal file
@ -0,0 +1,22 @@
|
||||
class NewsMailer < ApplicationMailer
|
||||
helper Merged::ViewHelper
|
||||
|
||||
def letter
|
||||
@page = Merged::Page.find_by_type("blog")
|
||||
|
||||
mail( to: "to@example.org" )
|
||||
end
|
||||
|
||||
def subscribed
|
||||
@greeting = "Hi"
|
||||
|
||||
mail to: "to@example.org"
|
||||
end
|
||||
|
||||
def unsubscribed
|
||||
@greeting = "Hi"
|
||||
|
||||
mail to: "to@example.org"
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user