Skip to content
✉️ NativeScript plugin for opening draft e-mails
Branch: master
Clone or download
Latest commit 6f3d5db Aug 1, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore cleanup Aug 1, 2019
.npmignore cleanup Aug 1, 2019
LICENSE initial version May 8, 2015 #14 Nov 19, 2018 cleanup Jun 19, 2019
email.ios.js cleanup Aug 1, 2019
index.d.ts Not working when Webpacked on Android #28 Jul 4, 2018
package.json cleanup Aug 1, 2019
references.d.ts cleanup Aug 1, 2019

NativeScript Email

NPM version Downloads Twitter Follow

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:


import * as email from "nativescript-email";
// or
import { compose } from "nativescript-email";
// or even
import { compose as composeEmail } from "nativescript-email";


var email = require("nativescript-email");



  email.available().then((avail: boolean) => {
      console.log("Email available? " + avail);


  email.available().then(function(avail) {
      console.log("Email available? " + avail);



  // let's first create a File object using the tns file module
  var fs = require("file-system");
  var appPath = fs.knownFolders.currentApp().path;
  var logoPath = appPath + "/res/telerik-logo.png";

      subject: "Yo",
      body: "Hello <strong>dude</strong> :)",
      to: ['', ''],
      cc: [''],
      bcc: ['', ''],
      attachments: [
            fileName: 'arrow1.png',
            mimeType: 'image/png'
            fileName: 'telerik-logo.png',
            path: logoPath,
            mimeType: 'image/png'
    function() {
      console.log("Email composer closed");
    }, function(err) {
      console.log("Error: " + err);

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.

Known issues

On iOS you can't use the simulator to test the plugin because of an iOS limitation. To prevent a crash this plugin returns false when available is invoked on the iOS sim.

You can’t perform that action at this time.