Commit c5339c7681449797968d1f16a51a0fe68e3ddcfa

Authored by Daniela Feitosa
1 parent 20d51a81

sendemail_plugin: defined content_type for email

Also removed "profile" param from confirmation view and email
plugins/send_email/lib/send_email_plugin/mail.rb
... ... @@ -35,7 +35,7 @@ class SendEmailPlugin::Mail
35 35 end
36 36  
37 37 def params=(value = {})
38   - [:action, :controller, :to, :message, :subject, :from, :commit].each{|k| value.delete(k)}
  38 + [:profile, :action, :controller, :to, :message, :subject, :from, :commit].each{|k| value.delete(k)}
39 39 @params = value
40 40 end
41 41  
... ...
plugins/send_email/lib/send_email_plugin/sender.rb
... ... @@ -7,6 +7,7 @@ class SendEmailPlugin::Sender < Noosfero::Plugin::MailerBase
7 7 @params = mail.params
8 8  
9 9 mail(
  10 + content_type: 'text/plain',
10 11 to: mail.to,
11 12 from: mail.from,
12 13 subject: "[#{mail.environment.name}] #{mail.subject}"
... ...
plugins/send_email/views/send_email_plugin/sender/send_message.html.erb
1 1 <%= _('Contact from %s') % @referer %>
2 2  
3 3 <%= word_wrap(@message || @mail.message) %>
  4 +
4 5 <% (@params || @mail.params).each_pair do |key, value| %>
5 6 <%= key %>: <%= word_wrap(value) %>
6 7 <% end %>
... ...