forked from bofh/fetsite
Merge branch 'master' of https://github.com/fetsite/fetsite
This commit is contained in:
@@ -81,7 +81,7 @@ class NeuigkeitenController < ApplicationController
|
|||||||
unless @neuigkeit.published?
|
unless @neuigkeit.published?
|
||||||
redirect_to [@neuigkeit.rubrik,@neuigkeit], notice: 'Neuigkeit muss veröffentlicht sein um sie als Mail zu versenden.'
|
redirect_to [@neuigkeit.rubrik,@neuigkeit], notice: 'Neuigkeit muss veröffentlicht sein um sie als Mail zu versenden.'
|
||||||
else
|
else
|
||||||
NewsMailer.neuigkeit_mail(current_user.email, params[:id],request.host_with_port).deliver
|
NewsMailer.neuigkeit_mail(current_user.email, params[:id]).deliver
|
||||||
redirect_to [@neuigkeit.rubrik,@neuigkeit], notice: 'Neuigkeit versendet'
|
redirect_to [@neuigkeit.rubrik,@neuigkeit], notice: 'Neuigkeit versendet'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
class NewsMailer < ActionMailer::Base
|
class NewsMailer < ActionMailer::Base
|
||||||
default from: "salzamt@fet.at"
|
default from: "salzamt@fet.at"
|
||||||
def neuigkeit_mail(email, neuigkeit_id,host)
|
def neuigkeit_mail(email, neuigkeit_id)
|
||||||
@neuigkeit= Neuigkeit.find(neuigkeit_id)
|
@neuigkeit= Neuigkeit.find(neuigkeit_id)
|
||||||
@host=host
|
|
||||||
mail(to: "andis@fet.at", subject: @neuigkeit.title)
|
mail(to: email, subject: @neuigkeit.title)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<h1>
|
<h1>
|
||||||
<%= @neuigkeit.title%>
|
<%= @neuigkeit.title%>
|
||||||
</h1>
|
</h1>
|
||||||
<%= image_tag @neuigkeit.picture.big_thumb.url(:host=>@host) %>
|
<%= image_tag @neuigkeit.picture.big_thumb.url %>
|
||||||
<%= raw(@neuigkeit.text) %>
|
<%= raw(@neuigkeit.text) %>
|
||||||
<p> Eine Nachricht aus deiner Fachschaft! wenn du diese Neuigkeiten nicht mehr bekommen willst hast du leider Pech gehabt es gibt keine Möglichkeit aus der FET wieder auszutreten.</p>
|
<p> Eine Nachricht aus deiner Fachschaft! wenn du diese Neuigkeiten nicht mehr bekommen willst hast du leider Pech gehabt es gibt keine Möglichkeit aus der FET wieder auszutreten.</p>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ Fetsite::Application.configure do
|
|||||||
|
|
||||||
# Disable delivery errors, bad email addresses will be ignored
|
# Disable delivery errors, bad email addresses will be ignored
|
||||||
# config.action_mailer.raise_delivery_errors = false
|
# config.action_mailer.raise_delivery_errors = false
|
||||||
|
config.action_mailer.default_url_options={:host=>"glonass.htu.tuwien.ac.at"}
|
||||||
# Enable threaded mode
|
# Enable threaded mode
|
||||||
# config.threadsafe!
|
# config.threadsafe!
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user