Skip to content

Commit

Permalink
Transformed module into plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Jul 12, 2015
1 parent fb92dce commit b42c5f4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
# NativeScript Email

An Email module for use in NativeScript apps.
An Email plugin for use in your NativeScript app.
You can use it to compose emails, edit the draft manually, and send it.

## Installation
From the command prompt go to your app's `app` folder and execute:
Run the following command from the root of your project:

```
npm install nativescript-email
tns plugin add nativescript-email
```

## Usage

### available
To use this plugin you must first require() it:

```js
var email = require( "./node_modules/nativescript-email/email" );
var email = require("nativescript-email");
```

### available

```js
email.available().then(function(avail) {
alert("Avail? " + avail);
alert("Available? " + avail);
})
```

### compose
```js
var email = require( "./node_modules/nativescript-email/email" );

email.compose({
subject: "Yo",
body: "Hello <strong>dude</strong> :)",
to: ['[email protected]', '[email protected]'],
cc: ['[email protected]'],
cc: ['[email protected]'],
bcc: ['[email protected]', '[email protected]']
}).then(function(r) {
console.log("email closed");
Expand All @@ -39,8 +41,7 @@ npm install nativescript-email

## Known issues
On Android, you can pass an array of to/cc/bcc, but only the first one is added.
Should be able to fix that in a future release.

## Future work
Add attachment support

Fix the known issues :)
Add attachment support
35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
{
"name": "nativescript-email",
"version": "1.0.0",
"description": "An Email module for use in NativeScript apps",
"version": "1.1.0",
"description": "Email plugin for your NativeScript app",
"main": "email.js",
"nativescript": {
"platforms": {
"ios": "1.1.0",
"android": "1.1.0"
}
},
"repository": {
"type": "git",
"url": "https://github.com/eddyverbruggen/nativescript-email.git"
},
"keywords": [
"NativeScript"
"NativeScript",
"Mail",
"Email",
"Draft",
"Compose",
"MailComposer"
],
"author": {
"name": "Eddy Verbruggen",
"email": "[email protected]",
"url": "http://x-services.nl/"
},
"license": {
"type": "MIT",
"url": "https://github.com/eddyverbruggen/nativescript-email/blob/master/LICENSE"
},
"bugs": {
"url": "https://github.com/eddyverbruggen/nativescript-email/issues"
},
"homepage": "https://github.com/eddyverbruggen/nativescript-email",
"readmeFilename": "README.md"
"author": "Eddy Verbruggen <[email protected]> (https://github.com/EddyVerbruggen)",
"license": "MIT",
"bugs": "https://github.com/eddyverbruggen/nativescript-email/issues",
"homepage": "https://github.com/eddyverbruggen/nativescript-email"
}

0 comments on commit b42c5f4

Please sign in to comment.