Forum: Ruby on Rails UserMailer return boolean value

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
David (Guest)
on 2009-05-29 01:41
(Received via mailing list)
Is it possible to make is UserMailer returns a boolean value depending
on whether an email was sent or not?  I have a method to send maybe I
could put it in here somehow?

def send_initial
Gavin M. (Guest)
on 2009-05-29 05:10
(Received via mailing list)
Hey David

The only thing I can think of here would be to set action mailer to
raise delivery errors in your development and production environments:
config.action_mailer.raise_delivery_errors = true

and then add something like the following to the method that sends the

  def my_mail_sending_method
      return false # => returns false if any exceptions are raised
    return true # => returns true if no exceptions are raised

There might be a better answer out there though? :s
This topic is locked and can not be replied to.