Suspend sending emails in ActionMailer
===

In my Rails application I want to temporarily stop sending email for specific users (e.g. when I get bounces due to quota) until the user confirms he is able to receive email again.

I have a common superclass for all mailer classes. There I always call a method `setup_email` before sending a mail.

Where is the best place to call `@user.mail_suspended?`?

Here is some simplified sample app, I use Rails 2.3:

    # Common super class for all Mailers
    class ApplicationMailer < ActionMailer::Base
  
      protected
        def setup_mail(user)
          @recipients = user.email
          @from = ...
        end
    end

    # Specific Mailer for User model
    class UserMailer < ApplicationMailer

      def message(user, message)
        setup_mail(user)
        @subject = "You got new message"
        @body[:message] = message
      end
    end

    # Use the UserMailer to deliver some message
    def MessagesController < ApplicationController

      def create
        @message = Message.new(params[:message])
        @message.save
        UserMailer.deliver_message(@message.user, @message)
        redirect_to ...
      end
    end