Disable action mailer only to blog posts in site


#1

how to write a code to stop mail sending when a new blog post is created
to the users.

app/mailers/blog mailer :

class BlogMailer < ActionMailer::Base

default from: " Impact Institute (alert)
removed_email_address@domain.invalid"

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.


#2

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


#3

Frederick C. wrote in post #1167785:

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

config.action_mailer.perform_deliveries = true

if i make this false all other mailers also wont work.
is there any other way of integrating,any condition or any code to write
with