i would say you should use postfix, and configure it so that all email goes to a local mailbox. you can do this by making it think it is the server for the domains in question, and from there, there's any number of ways you can deal with delivery. a maildrop script might be most flexible - if can even be set to create the mailboxes for you if they don't exist (thats if you don't want all the emails just going to one mailbox!)
then your code is real, and you can view the emails for debuggery.