[Git][noosfero/noosfero][stable-1.5] 3 commits: spaminator: update mailer to rials4 new scheme
Larissa Reis
gitlab at mg.gitlab.com
Fri Jul 1 21:23:19 BRT 2016
Larissa Reis pushed to branch stable-1.5 at Noosfero / noosfero
Commits:
094b0833 by Rodrigo Souto at 2016-06-27T12:41:38-03:00
spaminator: update mailer to rials4 new scheme
- - - - -
1eaec0f9 by Rodrigo Souto at 2016-06-27T13:10:25-03:00
spaminator: make a proper link to forgot password
- - - - -
5ce7c500 by Larissa Reis at 2016-07-02T00:22:16+00:00
Merge branch 'spaminator-mailing' into 'stable-1.5'
spaminator: update mailer to rails4 new scheme
See merge request !971
- - - - -
2 changed files:
- plugins/spaminator/lib/spaminator_plugin/mailer.rb
- plugins/spaminator/views/spaminator_plugin/mailer/inactive_person_notification.html.erb
Changes:
=====================================
plugins/spaminator/lib/spaminator_plugin/mailer.rb
=====================================
--- a/plugins/spaminator/lib/spaminator_plugin/mailer.rb
+++ b/plugins/spaminator/lib/spaminator_plugin/mailer.rb
@@ -2,14 +2,14 @@ class SpaminatorPlugin::Mailer < Noosfero::Plugin::MailerBase
include Rails.application.routes.url_helpers
def inactive_person_notification(person)
+ @person = person
+ @environment = person.environment
+ @url = url_for(:host => person.default_hostname, :controller => 'account', :action => 'forgot_password')
mail(
:to => person.email,
:from => "#{person.environment.name} <#{person.environment.noreply_email}>",
:subject => _("[%s] You must reactivate your account.") % person.environment.name,
:content_type => 'text/html',
- :body => {:person => person,
- :environment => person.environment,
- :url => url_for(:host => person.default_hostname, :controller => 'account', :action => 'forgot_password')}
)
end
=====================================
plugins/spaminator/views/spaminator_plugin/mailer/inactive_person_notification.html.erb
=====================================
--- a/plugins/spaminator/views/spaminator_plugin/mailer/inactive_person_notification.html.erb
+++ b/plugins/spaminator/views/spaminator_plugin/mailer/inactive_person_notification.html.erb
@@ -10,7 +10,7 @@
<%= _('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 %>
</p>
<p>
- <%= @url %>
+ <a href="<%= @url %>"><%= @url %></a>
</p>
<p>
<%= _("We are sorry that this procedure might bother you a lot, but it's necessary for the healthy of our network.") %>
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/02e67eb1efc9241e5695516fde2d63e7a8731a08...5ce7c500641131fdf14ab2cef37d9dbc72e1c5fa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160702/74864173/attachment-0001.html>
More information about the Noosfero-dev
mailing list