Mailer fuer Neuigkeiten added
This commit is contained in:
7
app/mailers/news_mailer.rb
Normal file
7
app/mailers/news_mailer.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class NewsMailer < ActionMailer::Base
|
||||
default from: "salzamt@fet.at"
|
||||
def neuigkeit_mail(email, neuigkeit_id)
|
||||
@neuigkeit= Neuigkeit.find(neuigkeit_id)
|
||||
mail(to: "andis@fet.at", subject: @neuigkeit.title)
|
||||
end
|
||||
end
|
||||
4
app/views/news_mailer/neuigkeit_mail.html.erb
Normal file
4
app/views/news_mailer/neuigkeit_mail.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<h1>
|
||||
<%= @neuigkeit.title%>
|
||||
</h1>
|
||||
<%= raw(@neuigkeit.text) %>
|
||||
Reference in New Issue
Block a user