As McStretch noted, an observer is the best way to process every message that is delivered by an email program. However, if you just want to capture 1 or 2 special cases, you can do the following:
Assuming you have a subclass of ActionMailer called MyMailer , and an email called foobar ,
# Rails 2.x mail = MyMailer.create_foobar(...)
source share