I think you need code a script to login in Gmail and Hotmail,because Gmail is full Ajax based.Most proxy script can't handle javascript correctly. Becuase i have coded a script called "phpproxy"(
http://sf.net/projects/phpproxy) .
You can look into this class "http://www.phpclasses.org/browse/package/2243.html" about how to access to gmail.