katzer / cordova-plugin-email-composer

Edit and send email messages
Apache License 2.0
343 stars 333 forks source link

cannot get Email.open() method to work #341

Closed BenieD closed 3 years ago

BenieD commented 5 years ago

Hello,

im trying to get this code to work on my android phone but when i try to run cordova.plugins.email.open() the error message is TypeError: Cannot read property 'email' of undefined.

is anyone else having this issue? any ideas how i can get it to work? many thanks for your time David

jfoclpf commented 3 years ago

sorry the very late reply

did you eventually solve the problem?

You can only use the plugin after deviceready is triggered

document.addEventListener('deviceready', function () {
    // cordova.plugins.email is now available
    cordova.plugins.email.open()
}, false);