Search code examples
cordovajquery-mobilecordova-plugins

Cordova EmailComposer plugin


I'm trying to use EmailComposer plugin with Cordova 5.0.0 and JQueryMobile. I've installed the plugin (here) using CLI. I'm testing using Phonegap App.

I have used the recommended syntax:

$("#btSend").on('touchstart', function(event) {                 
    console.log('--> @send');
    cordova.plugins.email.open({
        to:      '[email protected]',
        subject: 'Greetings',
        body:    '<h1>Nice greetings from Leipzig</h1>'}
    );
    return false;
});

But the code is not working. Trying to debug, I've placed under the "onDeviceReady" event handler:

console.log('--> @1: '+ (window.cordova===undefined).toString() );
console.log('--> @2: '+  (cordova.plugins===undefined).toString() );
console.log('--> @3: '+ (cordova.plugins.email===undefined).toString() );

The outputs are:

--> @1: false
--> @2: true
nothings appears here

Could you help me to find why the email plugin is not working?

Many thanks!!


Solution

  • "Phonegap App" doesn't support external plugins. According with: (stackoverflow.com/questions/27610738/email-plugin-not-available)