问题
I have imported EmailComposer Cordova plugin in my project. Now i am trying to call
window.plugin.EmailComposer.open({
to: ['max.mustermann@appplant.de'],
cc: ['erika.mustermann@appplant.de'],
bcc: ['john.doe@appplant.com', 'jane.doe@appplant.com'],
subject: 'Hello World!',
body: '<h3>TEST</h3><h2>TEST</h2><h1>TEST</h1>',
isHtml: true
});
method to send email with attachments. But i am getting following error
Cannot read property 'EmailComposer' of undefined
I don't know why this error coming. Even i dont know that EmailComposer plugin is imported or not in my project. Is there any way so i can confirm that.
Please provide your comments. Thanks in advanced.
回答1:
To confirm that plugin is installed, build your app in IntelXDK and the build log should have a message that "EmailComposer plugin was installed".
Also Cordova plugins cannot be tested in IntelXDK emulator, you haev to build app and install on device to test an app that uses plugins
来源:https://stackoverflow.com/questions/25696639/how-to-send-email-in-iphone-android-using-intel-xdk