[eluser]MASS MASS[/eluser]
Better you check for the followings....
>> you have friends in your address book...
>> check password.....
>> main things is cookiepath
$cookiePath = $_SERVER['DOCUMENT_ROOT'] . "/gmailcurl";
it should be server root and folder name (your folder name - gmailcurl)