tags:

views:

28

answers:

1

Hi, 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. But i don't know how to pass the params and what params i have to pass to tha MailService.

params.to ="[email protected]";
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.

A: 

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.

Ben Combee
if i am add the statement of declaration like var params = {};now i am getting the error like"Error: Error: service request: com.palm.mail.MailService is not running"Actually for this messageSend method how many params i have to send and what they are?
venka reddy
The problem you're seeing is that the mail service isn't running, so there's no process on the other end to actually get your request. You really need to just use a cross-app launch and let the user confirm the email -- that's the sane way to do this.
Ben Combee