2
votes

I have a big problem with this plugin:

https://github.com/katzer/cordova-plugin-email-composer

when i tried to send email on ios, all work well. but when i tried in Android, it did nothing.. And i receive the callback "email view is dismissed". I tested it on some device with different android version and in a blank project. My simple code:

cordova.plugins.email.open({app: 'mailto'}, function () {
    console.log('email view dismissed');
}, this);
2
Check if plugins are properly installed or not. - Jay Rathod RJ
yes it's installed.. Because it work on iOS. I found on github that it's a issue with the new version 0.8.3 and the new Cordova 6. - Steph8

2 Answers

8
votes

I solved this problem by installing this:

cordova plugin add https://github.com/katzer/cordova-plugin-email-composer.git#0.8.2

and remove the last version.

-2
votes

Following the process at this link helped me:

https://forum.ionicframework.com/t/cordovaemailcomposer-can-not-send-mail/50395/11

ignore the ionic part.

--EDIT--

You may try with these steps:

  1. Remove the plugin and android platform from your project.

  2. Add the email plugin from here:https://github.com/katzer/cordova-plugin-email-composer.git

  3. Add the Android platform.

I think the trick is you need to add the plugin before adding the android platform. Sounds silly but worked for me.