I can't think of any reason you'd need to do that unless you were trying to obtain some sort of anonymity - for spamming purposes, for example.
When you use the mail() command in PHP, you can specify the FROM address as well as the REPLY-TO address and you could insert your hotmail or gmail address there. The IP address in the headers would be your server, not Gmail's server, but that wouldn't hurt anything unless you were specifically trying to disguise the source of your mail.
Bogu is right, you're going to have trouble with CURL since their site is Ajax. But that doesn't really matter since you have the mail() command in PHP.
If you really have some need to have Gmail be the sender, then instead of PHP, you'll probably have to look into some client side script (like Applescript) that can control which fields are filled an and which buttons get clicked in your browser.