Let’s say I’ve called an actionmailer method which resides in a mailer.
I do the processing to determine if there are to be any recipients of the email in this method. Sometimes there are none, but it appears that once this method is called, it is impossible to abort sending. Finishing the method without setting a recipient throws an error. Is that correct? Is there no way to abort?
Thanks,
Chris.
This is the type of case where you should consider raising your own exception. You can define it in lib, and then catch it in the code that calls your mailer.