Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I have a problem for gmail conection, first i request to google mail server with the following code :

if(ISHELL_CreateInstance(pMe->applet.m_pIShell, AEECLSID_WEB, (void **)(&pMe->m_pIWeb)) != SUCCESS)
{ return FALSE; }

if(SUCCESS != ISHELL_CreateInstance(pMe->applet.m_pIShell, AEECLSID_SSLROOTCERTS, (void **)&(pMe->m_pIRoots)))
return FALSE;

if(SUCCESS != ISHELL_CreateInstance(pMe->applet.m_pIShell, AEECLSID_SOURCEUTIL, (void **)(&pMe->m_pIUtil)))
return FALSE;

if(SUCCESS != ISHELL_CreateInstance(pMe->applet.m_pIShell, AEECLSID_WEBUTIL, (void **)(&pMe->m_pIWebUtil)))
return FALSE;

if(CALLBACK_IsQueued(&pMe->m_Callback)==FALSE)
{
pMe->szPostTxt = MALLOC(200);

STRCPY(pMe->szPostTxt,"Email=something@gmail.com/r/nPasswd=something/r/nservice=mail");

if(pMe->szPostTxt)
ISOURCEUTIL_PeekFromMemory(pMe->m_pIUtil,pMe->szPostTxt, STRLEN(pMe->szPostTxt)+1, NULL, NULL, &pMe->pBody);

CALLBACK_Init(&pMe->m_Callback, WebResponse, pMe);

IWEB_GetResponse(pMe->m_pIWeb,(pMe->m_pIWeb, &pMe->m_pIWebResp , &pMe->m_Callback ,
"https://www.google.com/accounts/Login",

WEBOPT_HEADER, "html:application/x-www-form-urlencoded\r\n",
WEBOPT_HANDLERDATA, pMe,
WEBOPT_HEADERHANDLER, web_header_handler,

WEBOPT_METHOD, "POST",
WEBOPT_BODY, pMe->pBody,
WEBOPT_CONTENTLENGTH , STRLEN(pMe->szPostTxt)+1,

WEBOPT_DEFAULTS, pMe->m_pIRoots,

WEBOPT_COPYOPTS, TRUE,
WEBOPT_END));

ISOURCEUTIL_Release(pMe->m_pIUtil);

then got the response from google mail server with "IWEBRESP_GetInfo" api but getting google mail html page in a response form , actually should get tokens.

so how can i get tokens or what is wrong in the above code.

if u use it this way, u would only get the html code that would get displayed on the browser.
thanks.

if u use it this way, u would only get the html code that would get displayed on the browser.
thanks.