Commit 97b4ad83c52ee1b0331055aa61001ef2e2a04aa5

Authored by Larissa Reis
2 parents 4d031bf1 9cb92a3a

Merge branch 'spaminator-mailing'

spaminator: update mailer to rails4 new scheme

See merge request !971
plugins/spaminator/lib/spaminator_plugin/mailer.rb
... ... @@ -2,14 +2,14 @@ class SpaminatorPlugin::Mailer < Noosfero::Plugin::MailerBase
2 2  
3 3 include Rails.application.routes.url_helpers
4 4 def inactive_person_notification(person)
  5 + @person = person
  6 + @environment = person.environment
  7 + @url = url_for(:host => person.default_hostname, :controller => 'account', :action => 'forgot_password')
5 8 mail(
6 9 :to => person.email,
7 10 :from => "#{person.environment.name} <#{person.environment.noreply_email}>",
8 11 :subject => _("[%s] You must reactivate your account.") % person.environment.name,
9 12 :content_type => 'text/html',
10   - :body => {:person => person,
11   - :environment => person.environment,
12   - :url => url_for(:host => person.default_hostname, :controller => 'account', :action => 'forgot_password')}
13 13 )
14 14 end
15 15  
... ...
plugins/spaminator/views/spaminator_plugin/mailer/inactive_person_notification.html.erb
... ... @@ -10,7 +10,7 @@
10 10 <%= _('Due to the recent increase in the number of spams on %s, we decided to deactivate all inactive users on the network. It just happens that you are one of them! But there is no need to worry. Your account is completely preserved and if you want to reactivate it you just need to click on the following link and recover your password (since it was changed to a huge scramble of random characters):') % @environment.name %>
11 11 </p>
12 12 <p>
13   - <%= @url %>
  13 + <a href="<%= @url %>"><%= @url %></a>
14 14 </p>
15 15 <p>
16 16 <%= _("We are sorry that this procedure might bother you a lot, but it's necessary for the healthy of our network.") %>
... ...