Commit 7520c2b977febbbf716be2049a1debc7f7b78213
1 parent
03d0f238
Exists in
master
code cleaned
Showing
1 changed file
with
0 additions
and
17 deletions
Show diff stats
controllers/email_article_plugin_myprofile_controller.rb
... | ... | @@ -4,41 +4,24 @@ class EmailArticlePluginMyprofileController < MyProfileController |
4 | 4 | # before_filter :check_access_to_profile, :except => [:join, :join_not_logged, :index, :add] |
5 | 5 | # before_filter :store_location, :only => [:join, :join_not_logged, :report_abuse, :send_mail] |
6 | 6 | # before_filter :login_required, :only => [:add, :join, :join_not_logged, :leave, :unblock, :leave_scrap, :remove_scrap, :remove_activity, :view_more_activities, :view_more_network_activities, :report_abuse, :register_report, :leave_comment_on_activity, :send_mail] |
7 | - | |
8 | - | |
9 | 7 | |
10 | 8 | def send_email |
11 | -# puts "ID ***************************" | |
12 | -# y params[:id] | |
13 | -# puts "END ID ***************************" | |
14 | -# profile = Profile[params[:profile]] | |
15 | 9 | article = Article.find(params[:id]) |
16 | 10 | EmailArticlePluginMyprofileController::Sender.deliver_mail(article) |
17 | 11 | render :text=>'ok' |
18 | 12 | end |
19 | 13 | |
20 | - | |
21 | 14 | class Sender < ActionMailer::Base |
22 | 15 | def mail(article) |
23 | - | |
24 | 16 | members = article.profile.members |
25 | 17 | emails = [] |
26 | 18 | members.each{ |m| |
27 | 19 | emails.push(m.user.email) |
28 | 20 | } |
29 | -# puts "***************************" | |
30 | -# y emails | |
31 | -# puts "***************************" | |
32 | 21 | content_type 'text/html' |
33 | 22 | recipients emails |
34 | 23 | from "#{article.author.user.name} <#{article.author.user.email}>" |
35 | 24 | reply_to article.author.user.email |
36 | -# if contact.sender | |
37 | -# headers 'X-Noosfero-Sender' => contact.sender.identifier | |
38 | -# end | |
39 | -# if contact.receive_a_copy | |
40 | -# cc "#{@article.author.user.name} <#{@article.author.user.email}>" | |
41 | -# end | |
42 | 25 | subject "[Artigo] " + article.title |
43 | 26 | body article.body |
44 | 27 | end | ... | ... |