开发者

palm webOS MailService parameter passing problem

开发者 https://www.devze.com 2023-01-05 05:34 出处:网络
i am developing an application in palm webOS. In that application i have to use the MailService to send mail directly without opening any of the email or compose scenes. For that i have to pass params

i am developing an application in palm webOS. In that application i have to use the MailService to send mail directly without opening any of the email or compose scenes. For that i have to pass params. B开发者_运维问答ut i don't know how to pass the params and what params i have to pass to tha MailService.

params.to ="mailId@abc.com";
params.subject = "subj";
params.msg = "message";
this.controller.serviceRequest('palm://com.palm.mail.MailService', {
        method: 'messageSend',
        parameters: params,
        onSuccess: this.messageSentCallback,
        onError: this.messageErrorCallback          
    });

But i am getting error of " Uncaught TypeError: Cannot set property 'to' of undefined," can you help me to resolve this problem please.

ThanQ for all.


This looks like a basic Javascript error. Did you put a line like "var params = {};" first to declare the params variable as an empty object?

Do note -- sending email using the service requires that your app access the private system bus as a com.palm.* application. This means you won't be able to distribute via the App Catalog.

0

精彩评论

暂无评论...
验证码 换一张
取 消