Does GMail allow unsecure, unauthenticated traffic? I didn't think they did, in which case you can't use the internal mail() command (since it supports neither SSL connections nor SMTP authentication).
Instead, you'll have to look into using a 3rd party class (such as PHPMailer, XPertMaailer, a PEAR package, etc. etc.) to send e-mail through Google's servers.