Sometime ago I signed up with Google Apps to have them handle all my email. Initially everything went very smoothly and I was pleased with the decision. However, I soon noticed that I wasn't getting any emails from the contact form on my web site.
After many hours of searching I finally found the cause. The 'contact us' page used a fairly standard formmail type script. This sends email out using the server's MTA, in my case, Postfix. My out of the box Postfix was actually setup to deliver any email addressed to @mydomain.com locally, rather than sending it out to my remotely hosted email service, in this case Google Apps Mail.
The solution was pretty simple and I eventually found it here. All I had to do was edit the /etc/postfix/main.cf file and change the mydestination variable to:
mydestination = localhost
Then I restarted the Postfix service and tested my contact form... and it worked! I hope this helps anyone else in the same situation. Remember to backup config files before making any changes though, in case this solution isn't the right one for you :)