I'm trying to send emails out of a Padrino app asynchronously - I've tried using Ruby fork command but that doesn't scale very well I think, I tried delayed_job also but have now settled on Resque (mainly because the web interface it comes with is super nice).
I have it working except I had to resort to using Pony instead of padrino-mailer to send my emails from /lib. I'd appreciate any help removing Pony from the picture. The main problem I have is that I don't know how to call padrino-mailer from outside of a controller or helper. I'm sure it's possible, and would appreciate any help. If we can get this sorted out I would think that this might be very useful to other Padrino developers - sending emails async is probably a very common core scalability requirement for web apps.
See here for info on how to install and configure Resque : https://github.com/defunkt/resque
Then look here for how to send emails async from Padrino via Resque : https://gist.github.com/1384630
An update - I switched to using the ruby mail gem for sending the emails from /lib - see the updated gist for the updated module for sending async emails via resque.
I'm still interested to know if padrino-mailer can be coerced into working from /lib - help on that is still appreciated.