Skip to content
Permalink
Browse files

Adjusted SMTP service handling & echo mail addresses.

  • Loading branch information...
Laszlo Papp
Laszlo Papp committed Nov 28, 2011
2 parents eb44e1b + b59cc8a commit c6e9b2661db116ad186aeb285556d35df81bc76c
@@ -12,7 +12,7 @@ generated by the software in one single license.

Until the exact terms of echo Public License are published, copying, modifying, distributing, installing or using ANY
components or parts of this software without explicit written permission of the echo team is strictly forbidden.
If you would like to contribute to the development of echo, please contact us at team@echologic.org.
If you would like to contribute to the development of echo, please contact us at team@echo.to.

Please note, that the prohibitive terms of the current license are subject to change in the near future to pave
the way for an open source development strategy with active participation of engaged developers from our community.
2 README
@@ -36,7 +36,7 @@ generated by the software in one single license.

Until the exact terms of echo Public License are published, copying, modifying, distributing, installing or using ANY
components or parts of this software without explicit written permission of the echo team is strictly forbidden.
If you would like to contribute to the development of echo, please contact us at team@echologic.org.
If you would like to contribute to the development of echo, please contact us at team@echo.to.

Please note, that the prohibitive terms of the current license are subject to change in the near future to pave
the way for an open source development strategy with active participation of engaged developers from our community.
@@ -6,7 +6,7 @@ class ActivityTrackingMailer < ActionMailer::Base
def activity_tracking_mail(recipient, root_events, question_tag_counts, events)
language = recipient.default_language
subject I18n.t('mailers.activity_tracking.subject', :locale => language.code)
from "noreply@echologic.org"
from "content@echo.to"
recipients recipient.email
sent_on Time.now
content_type "text/html"
@@ -3,7 +3,7 @@
class DraftingMailer < ActionMailer::Base
def approval(mail_data)
subject I18n.t('mailers.drafting.approval.subject')
from "noreply@echologic.org"
from "drafting@echo.to"
recipients mail_data[:incorporable_document].author.email
sent_on Time.now
body :name => mail_data[:incorporable_document].author.full_name,
@@ -16,7 +16,7 @@ def approval(mail_data)

def supporters_approval(recipients, mail_data)
subject I18n.t('mailers.drafting.supporters_approval.subject')
from "noreply@echologic.org"
from "drafting@echo.to"
bcc recipients.map(&:email)
sent_on Time.now
body :ip_title => mail_data[:incorporable_document].title.strip,
@@ -28,7 +28,7 @@ def supporters_approval(recipients, mail_data)

def approval_notification(recipients, mail_data)
subject I18n.t('mailers.drafting.approval_notification.subject')
from "noreply@echologic.org"
from "drafting@echo.to"
bcc recipients.map(&:email)
sent_on Time.now
body :ip_title => mail_data[:incorporable_document].title.strip,
@@ -39,7 +39,7 @@ def approval_notification(recipients, mail_data)

def approval_reminder(mail_data)
subject I18n.t('mailers.drafting.approval_reminder.subject')
from "noreply@echologic.org"
from "drafting@echo.to"
recipients mail_data[:incorporable_document].author.email
sent_on Time.now
body :name => mail_data[:incorporable_document].author.full_name,
@@ -52,7 +52,7 @@ def approval_reminder(mail_data)

def supporters_approval_reminder(recipients, mail_data)
subject I18n.t('mailers.drafting.supporters_approval_reminder.subject')
from "noreply@echologic.org"
from "drafting@echo.to"
bcc recipients.map(&:email)
sent_on Time.now
body :hours => DraftingService.approved_hours_left,
@@ -64,7 +64,7 @@ def supporters_approval_reminder(recipients, mail_data)

def passed(mail_data)
subject I18n.t('mailers.drafting.passed.subject')
from "noreply@echologic.org"
from "drafting@echo.to"
recipients mail_data[:incorporable_document].author.email
sent_on Time.now
body :name => mail_data[:incorporable_document].author.full_name,
@@ -75,7 +75,7 @@ def passed(mail_data)

def supporters_passed(recipients, mail_data)
subject I18n.t('mailers.drafting.supporters_passed.subject')
from "noreply@echologic.org"
from "drafting@echo.to"
bcc recipients.map(&:email)
sent_on Time.now
body :ip_title => mail_data[:incorporable_document].title.strip,
@@ -86,7 +86,7 @@ def supporters_passed(recipients, mail_data)

def incorporated(mail_data)
subject I18n.t('mailers.drafting.incorporated.subject')
from "noreply@echologic.org"
from "drafting@echo.to"
recipients mail_data[:draftable_document].author.email
sent_on Time.now
body :name => mail_data[:draftable_document].author.full_name,
@@ -98,7 +98,7 @@ def incorporated(mail_data)

def incorporation_notification(recipients, mail_data)
subject I18n.t('mailers.drafting.incorporation_notification.subject')
from "noreply@echologic.org"
from "drafting@echo.to"
bcc recipients.map(&:email)
sent_on Time.now
body :ip_title => mail_data[:incorporable_document].title.strip,
@@ -5,7 +5,7 @@ class FeedbackMailer < ActionMailer::Base
def feedback(feedback)
subject "echo - Feedback from #{feedback.name}"
recipients FEEDBACK_RECIPIENT
from "feedback@echologic.org"
from "feedback@echo.to"
reply_to [feedback.email, FEEDBACK_RECIPIENT]
sent_on Time.now
body :name => feedback.name, :message => feedback.message
@@ -26,7 +26,7 @@ def newsletter_mail(recipient, newsletter, current_language = false)

subject subject
recipients recipient.email
from "noreply@echologic.org"
from "news@echo.to"
sent_on Time.now
content_type "text/html"
body :online_url => newsletter_url(newsletter, :locale => language_code),
@@ -5,7 +5,7 @@ def user_mail(sender, recipient, mail)
language = recipient.default_language
subject I18n.t("mailers.user_mail.subject",
:subject => mail[:subject])
from "noreply@echologic.org"
from "user@echo.to"
recipients [recipient.email]
reply_to [sender.email]
sent_on Time.now
@@ -4,27 +4,27 @@ class RegistrationMailer < ActionMailer::Base
# TODO i18n see view
def activation_instructions(user)
subject I18n.t('mail.activation.subject')
from "noreply@echologic.org"
from "account@echo.to"
recipients user.email
sent_on Time.now
body :name => user.full_name, :activation_url => register_url(user.perishable_token)
body :activation_url => register_url(user.perishable_token)
end

# Delivers activation request to the given user.
# TODO i18n see view
def activate(user)
subject I18n.t('mail.activation.subject')
from "noreply@echologic.org"
from "account@echo.to"
recipients user.email
sent_on Time.now
body :name => user.full_name, :activation_url => activate_url(user.perishable_token)
end

# Delivers activation request to the given user.
# TODO i18n see view
def activate_email(user, email, token)
subject I18n.t('mail.activation.subject')
from "noreply@echologic.org"
from "account@echo.to"
recipients email
sent_on Time.now
body :name => user.full_name, :activation_url => pending_action_url(token)
@@ -34,7 +34,7 @@ def activate_email(user, email, token)
# TODO i18n see view
def activation_confirmation(user)
subject I18n.t('mail.welcome.subject')
from "noreply@echologic.org"
from "account@echo.to"
recipients user.email
sent_on Time.now
body :name => user.full_name
@@ -43,7 +43,7 @@ def activation_confirmation(user)
# Send a password reset email containing a link to reset via perishable_token.
def password_reset_instructions(user)
subject I18n.t('mail.new_password.subject')
from "noreply@echologic.org"
from "account@echo.to"
recipients user.email
sent_on Time.now
body :name => user.full_name, :edit_password_reset_url => edit_password_reset_url(user.perishable_token)
@@ -1,4 +1,4 @@
<%= I18n.t('mail.activation.text1', :name => @name) %>
<%= I18n.t('mail.activation.text1') %>
<%= @activation_url %>

<%= I18n.t('mail.activation.text2') %>
@@ -16,6 +16,9 @@

# Add additional load paths for your own custom dirs
# config.load_paths += %W( #{RAILS_ROOT}/extras )
config.load_paths += %w(statements mailers).collect{|dir|"#{RAILS_ROOT}/app/models/#{dir}"}
config.load_paths += %w(statements).collect{|dir|"#{RAILS_ROOT}/app/controllers/#{dir}"}
config.load_paths += %w(activity_tracking_service drafting_service echo_service social_service).collect{|dir|"#{RAILS_ROOT}/lib/#{dir}"}

# Specify gems that this application depends on and have them installed with rake gems:install
# config.gem "sqlite3-ruby", :lib => "sqlite3"
@@ -59,18 +62,20 @@

# Action Mailer
config.action_mailer.default_charset = "utf-8"
SMTP_DOMAIN = ENV['ECHO_SMTP_DOMAIN']
SMTP_HOST = ENV['ECHO_SMTP_HOST']
SMTP_USER = ENV['ECHO_SMTP_USER']
SMTP_PASS = ENV['ECHO_SMTP_PASS']
require File.join(File.dirname(__FILE__), 'smtp_config') # Setting SMTP data in EngineYard environment

# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
# config.i18n.default_locale = :en

# Authologic RPX
# Authlogic RPX
RPX_APP_NAME = ENV['ECHO_RPX_APP_NAME']
RPX_API_KEY = ENV['ECHO_RPX_API_KEY']

# Setting RPX data in EngineYard environment
require File.join(File.dirname(__FILE__), 'rpx_config')

require File.join(File.dirname(__FILE__), 'rpx_config') # Setting RPX data in EngineYard environment
raise "RPX/Janrain Engage API key must be defined ENV['ECHO_RPX_API_KEY']" unless RPX_API_KEY
raise "RPX/Janrain Engage Application Name must be defined ENV['ECHO_RPX_APP_NAME']" unless RPX_APP_NAME

@@ -80,11 +85,4 @@
# Session Storage
config.action_controller.session_store = :active_record_store

# add load paths for models in subfolders... this can be extended by further subfolders if neccessary
config.load_paths += %w(statements mailers).collect{|dir|"#{RAILS_ROOT}/app/models/#{dir}"}
# the same for controllers
config.load_paths += %w(statements).collect{|dir|"#{RAILS_ROOT}/app/controllers/#{dir}"}
# libs
config.load_paths += %w(activity_tracking_service drafting_service echo_service social_service).collect{|dir|"#{RAILS_ROOT}/lib/#{dir}"}

end
@@ -9,8 +9,8 @@
ActivityTrackingService.instance.charges = 3
ActivityTrackingService.instance.period = 6.minutes
else
ActivityTrackingService.instance.charges = 24
ActivityTrackingService.instance.period = 1.day
ActivityTrackingService.instance.charges = 36
ActivityTrackingService.instance.period = 3.days
end

ActiveRecord::Base.send :include, ActiveRecord::Acts::Subscribeable
@@ -1,10 +1,11 @@
ActionMailer::Base.smtp_settings = {
:address => 'smtp.1und1.de',
:address => SMTP_HOST,
:port => 25,
:domain => 'noreply@echo-logic.org',
:domain => SMTP_DOMAIN,
:authentication => :login,
:user_name => 'noreply@echo-logic.org',
:password => 'nreopbosP@ss'
:enable_starttls_auto => true,
:user_name => SMTP_USER,
:password => SMTP_PASS
}

ActionMailer::Base.raise_delivery_errors = true
@@ -23,15 +23,15 @@ de:
Blog: http://blog.echo.to
Twitter: http://twitter.com/echologic
Facebook: http://www.facebook.com/echo.agora
E-Mail: team@echologic.org
E-Mail: team@echo.to
signature_as_html: |-
<strong>echo</strong> - Demokratie zum Mitmachen
<br/><br/>
Web: <a href="http://echo.to/de">http://echo.to</a><br/>
Blog: <a href="http://blog.echo.to">http://blog.echo.to</a><br/>
Twitter: <a href="http://twitter.com/echologic">http://twitter.com/echologic</a><br/>
Facebook: <a href="http://www.facebook.com/echo.agora">http://www.facebook.com/echo.agora</a><br/>
E-Mail: <a href="mailto:team@echologic.org">team@echologic.org</a>
E-Mail: <a href="mailto:team@echo.to">team@echo.to</a>
newsletter:
show_online: "Wird der Newsletter nicht richtig dargestellt, klicken Sie bitte hier."
@@ -155,7 +155,7 @@ de:
echo source e.V.<br/>
Senefelderstr. 22<br/>
10437 Berlin<br/>
E-mail: <a href="mailto:team@echologic.org">team@echologic.org</a><br/>
E-mail: <a href="mailto:team@echo.to">team@echo.to</a><br/>
</p><p>
<strong>Haftungshinweis</strong>:<br/>
Im Rahmen unseres Dienstes werden auch Links zu Internetinhalten anderer Anbieter bereitgestellt.
@@ -900,14 +900,14 @@ de:
activation:
subject: "Freischaltung Ihres Zugangs zu echo"
text1: |
Liebe(r) {{name}},
Hallo,
vielen Dank, dass Sie sich auf echo angemeldet haben. Bitte aktivieren Sie Ihren Zugang über den unten stehenden Link.
text2: |
Sollte dieser Link nicht funktionieren, kopieren Sie bitte den Link in die Adressleiste Ihres Browsers.
Sollten Sie weitere Schwierigkeiten mit Ihrem echo Zugang haben, zögern Sie bitte nicht uns jederzeit unter
support@echologic.org zu kontaktieren.
support@echo.to zu kontaktieren.
Wir freuen uns sehr auf ein baldiges Treffen auf echo,
@@ -944,7 +944,7 @@ de:
Sollte dieser Link nicht funktionieren, kopieren Sie ihn bitte in die Adressleiste Ihres Browsers.
Sollten Sie weitere Schwierigkeiten mit Ihrem echo Zugang haben, zögern Sie bitte nicht uns jederzeit
unter support@echologic.org zu kontaktieren. Wir helfen Ihnen gerne und schnellstmöglich.
unter support@echo.to zu kontaktieren. Wir helfen Ihnen gerne und schnellstmöglich.
Wir wuenschen Ihnen weiterhin viel Inspiration und Spass in der echo Community.
Mit den besten Grüßen,
@@ -964,7 +964,7 @@ de:
kopieren Sie bitte die URL und fügen Sie sie in ein neues Browserfenster ein.
Sollten Sie weitere Schwierigkeiten mit Ihrem echo Zugang haben, zögern Sie bitte nicht uns
jederzeit unter support@echologic.org zu kontaktieren.
jederzeit unter support@echo.to zu kontaktieren.
Wir freuen uns sehr auf ein baldiges Treffen auf echo.
@@ -23,15 +23,15 @@ en:
Blog: http://blog.echo.to
Twitter: http://twitter.com/echologic
Facebook: http://www.facebook.com/echo.agora
E-Mail: team@echologic.org
E-Mail: team@echo.to
signature_as_html: |-
<strong>echo</strong> - Living Democracy
<br/><br/>
Web: <a href="http://echo.to/en">http://echo.to</a><br/>
Blog: <a href="http://blog.echo.to">http://blog.echo.to</a><br/>
Twitter: <a href="http://twitter.com/echologic">http://twitter.com/echologic</a><br/>
Facebook: <a href="http://www.facebook.com/echo.agora">http://www.facebook.com/echo.agora</a><br/>
E-Mail: <a href="mailto:team@echologic.org">team@echologic.org</a>
E-Mail: <a href="mailto:team@echo.to">team@echo.to</a>
newsletter:
show_online: "Click here if the newsletter isn't displaying correctly."

0 comments on commit c6e9b26

Please sign in to comment.
You can’t perform that action at this time.