katzer / cordova-plugin-email-composer

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

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

Closed BenieD closed 2 years ago

BenieD commented 4 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 2 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);