palm webOS MailService参数传递问题

发布于 2024-09-07 05:55:26 字数 685 浏览 2 评论 0原文

我正在 palm webOS 中开发一个应用程序。在该应用程序中,我必须使用 MailService 直接发送邮件,而无需打开任何电子邮件或撰写场景。为此我必须传递参数。但我不知道如何传递参数以及我必须传递给 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          
    });

但我收到错误“Uncaught TypeError: Cannot set property 'to' of undefined” 你能帮我解决这个问题吗?

感谢所有人。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

热鲨 2024-09-14 05:55:35

这看起来像是一个基本的 Javascript 错误。你是否放置了像“var params = {};”这样的行首先将 params 变量声明为空对象?

请注意 - 使用该服务发送电子邮件要求您的应用程序作为 com.palm.* 应用程序访问专用系统总线。这意味着您将无法通过应用程序目录进行分发。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文