Ruby on Rails Friday, February 6, 2015



On Friday, February 6, 2015 at 11:45:44 AM UTC, Ruby-Forum.com User wrote:
how to write a code to stop mail sending when a new blog post is created
to the users.

app/mailers/blog mailer :


Somewhere in your app will be something calling this mailer - remove it.

Fred
 
class BlogMailer < ActionMailer::Base

  default from: " Impact Institute (alert)
<no-reply@impactinstitute.org>"

  def new_post_alert(follower, post)
    @follower, @post = follower, post
    mail(:to => "#{follower.name} <#{follower.email}>", :subject => "New
Blog entry at impactinstitute.org: #{post.title}")
  end
end

i have reasearch mailer file and also resource mailer.i only want above
functionality to stop mails to the users when new post is created plz
help.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bc6541e3-f916-4665-9d92-bb5a94035088%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment