Reputation: 280
It might be repeating question but did not find any solution after search of whole day. I'm developing phonegap application for blackberry os 7 but stuck into email(message) composer plugin. Is there any plugin of phonegap (cordova 2.7) for email composer that support blackberry os 7.
If you guys have any idea please share it. I have tried blackberry os message API and also tried mailto: of HTML5 but both are not working might be I'm doing in wrong way, if you guys have tried this and get success please share the process. Thanks
Upvotes: 1
Views: 354
Reputation: 221
BlackBerry 7 provides html5 API blackberry.invoke.MessageArguments for email composer and it is easy to use instead of writing plugin for this.
Steps to implement blackberry.invoke.MessageArguments
Add these code to config.xml file
<feature id="blackberry.invoke" />
<feature id="blackberry.invoke.MessageArguments" />
<feature id="blackberry.message" />
Add this code into your js file and call the method.
function sendMail(){
var toRecipient = "[email protected]"; var subject = "Test Mail"; var body = "This is test mail, Please do not reply ..."; var args = new blackberry.invoke.MessageArguments(toRecipient, subject, body); args.view = blackberry.invoke.MessageArguments.VIEW_NEW; blackberry.invoke.invoke(blackberry.invoke.APP_MESSAGES, args); }
Another way to use email composer in Blackberry 7 is use "mailto"
Sample code is:
var sMailTo = "mailto:";
sMailTo += escape(toRecipient) +"?subject=" +escape(subject) +"&body=" +escape(body) +"&cc=" +escape(ccRecipient);
window.open(sMailTo, '_self');
Upvotes: 1