I was in a pickle with a copier with a scan to email function and email hosted on google apps. No matter what I tried, I couldn't get the authentication to work. Then I found this page that talks about using hmailserver basically as a relay to gmail. I tried it, and it worked great.
Complete instructions on the hmailserver setup:
EDIT - in a failed installation, I found three things that needed fixing that I didn't do quite right that you may want to pay attention to in the future:
1) if on a machine with a firewall, you'll need to open up port 25
2) the port for sending to gmail must be 465. I tried 587 - which should work, but it didn't. I tried this on 12/27/12. I can't explain that - it was the only change I made so I know that the port number needed to be 465.
3) In Advanced -> IP ranges, you'll want the "firewalled subnets" or whatever you call the range that includes your copier - you'll want priority to be the highest number (meaning if the highest number is 20, you'll want your copier's priority to be 20 or 25 or higher). I'm used to MX records, so I figured lower would be a higher priority, but that was not true.