You can use this plugin to compose an e-mail, have the user edit the draft manually, and send it.
Note that this plugin depends on the default mail app. If you want a fallback to a third party client app like Gmail or Outlook, then check for availability, and if not available use a solution like the Social Share plugin.
Run this command from the root of your project:
tns plugin add nativescript-email
To use this plugin you must first require/import it:
;// or;// or even;
var email = ;
// let's first create a File object using the tns file modulevar fs = ;var appPath = fsknownFolderspath;var logoPath = appPath + "/res/telerik-logo.png";;
Full attachment support has been added to 1.3.0 per the example above.
Since 1.4.0 the promise will be rejected in case a file can't be found.
Usage with Angular
Check out this tutorial (YouTube) to learn how to use this plugin in a NativeScript-Angular app.
On iOS you can't use the simulator to test the plugin because of an iOS limitation.
To prevent a crash this plugin returns
available is invoked on the iOS sim.