configure actionmailer to recieve email on localhost?

Rails doesn't care frome where you get your emails, you just have to forward them using script/runner YourMailer.receive(email) or more probably YourMailer.receive(
Personally I use getmail, you can find some docs on the wiki.
The code you posted is for _sending_ emails.
Receiving with SMTP is quite hard, you need POP3/imap.

Have fun !

If you're on osx, and trying to pop gmail (a narrow set of choices?), this reference may help: