disable action mailer only to blog posts in site

17 views
Skip to first unread message

Sailatha K.

unread,
Feb 6, 2015, 6:45:44 AM2/6/15
to rubyonra...@googlegroups.com
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)
<no-r...@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/.

Frederick Cheung

unread,
Feb 6, 2015, 8:10:08 AM2/6/15
to rubyonra...@googlegroups.com


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

Sailatha K.

unread,
Feb 9, 2015, 2:14:01 AM2/9/15
to rubyonra...@googlegroups.com
Frederick Cheung 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

is there any other way of integrating,i dont want remove the
blog_mailer.rb file.
any condition or any code to write with .
Reply all
Reply to author
Forward
0 new messages