Email on Palm

Previous topic - Next topic

MrTAToad

Thanks to a suggestion from the Palm forums, I have managed to call webOS's email system from GLBasic, allowing me to send attachments :

Code (glbasic) Select
INLINE
?IFDEF WEBOS
extern "C" unsigned int __stdcall PDL_ServiceCall(const char *uri, const char *payload);
extern "C" int __stdcall sprintf(char* str,const char* format,...);
?ENDIF
ENDINLINE

FUNCTION sendEMail%:file$
?IFDEF WEBOS
INLINE
char sz1[] = "{ \"id\":\"com.palm.app.email\", \"params\": { \"summary\":\"Converted Graphics\",   \"attachments\": [{ \"fullPath\": \"%s\"  }] }        }";
char szParams[512]={0};

sprintf(szParams, sz1, file_Str.c_str() );

PDL_ServiceCall("palm://com.palm.applicationManager/launch", szParams );
ENDINLINE
?ENDIF
ENDFUNCTION