palm webOS MailService参数传递问题
我正在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来像是一个基本的 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.