npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-emailsender

v1.0.4

Published

BlackBerry 10 Community Contributed API to send email accounts on the device

Downloads

8

Readme

community.emailSender Native Extension for applications built using BlackBerry 10 WebWorks

This extension provides additional APIs to send emails from an app.

Applies To

Author(s)

Version History

1.0.0 Initial Release
1.0.1 Adds method for getting Email Accounts
1.0.2 Now supports HTML emails in addition to plain text, flag for stripping of html tags for text emails
1.0.3 Supports automatic adding of vcf, signature, or attachments to email
1.0.4 Supports sending raw byte array attachments

Set up

From registry Use the command:

cordova plugin add cordova-plugin-emailsender

From source

Copy the plugin folder to the destination of your choice. Browse to you webworks project folder. Use the command:

webworks plugin add pathToPluginFolder

Use

Here's the usage for the sendEmail() method:

// Build email JSON
var emailJSON = {
	"Type": "html", //for plain text replace with "txt"
	"tags": "false", // true and txt for Type will remove all <> formatting from the body
	"From": "12345678", //id of an email account on the device
	"To": "[email protected]",
	"Cc": "[email protected]",
	"Bcc": "[email protected]",
	"subject" : "Email Subject",
	"body": "Email body",
	"vCard": "true", // will add vCard from the 'vCardLocation'
	"vCardLocation": "file:///accounts/1000/shared/documents/file.vcf",
	"signature": "true", // will add vCard from the 'signatureLocation'
	"signatureLocation": "file:///accounts/1000/shared/documents/file.txt",
	"attachment": "true", // will add vCard from the 'attachmentLocation'
	"attachmentLocation": "file:///accounts/1000/shared/documents/file.ext" //will also accept file path as "/accounts/1000/shared/...",
																	"/accounts/1000/removable/sdcard/...", or "./app/native/..."
};
var status = community.emailsenderplugin.sendEmail(emailJSON);

The fields "To", "Cc" and "Bcc" can be filled with a json array. Here's an example with the "To" field.

// Build email JSON
var emailJSON = {
	"Type": "html",
	"tags": "false",
	"From": "12345678", //id of an email account on the device
	"To": ["[email protected]", "[email protected]", "[email protected]"],
	"Cc": "[email protected]",
	"Bcc": "[email protected]",
	"subject" : "Email Subject",
	"body": "Email body",
	"vCard": "true",
	"vCardLocation": "file:///accounts/1000/shared/documents/file.vcf",
	"signature": "false",
	"signatureLocation": "",
	"attachment": "true",
	"attachmentLocation": "/accounts/1000/shared/documents/file.ext"
};
var status = community.emailsenderplugin.sendEmail(emailJSON);

To use the default account use "-1" as the account id:

// Build email JSON
var emailJSON = {
	"Type": "txt",
	"tags": "false",
	"From": "-1", //use the default email
	"To": ["[email protected]", "[email protected]", "[email protected]"],
	"Cc": "[email protected]",
	"Bcc": "[email protected]",
	"subject" : "Email Subject",
	"body": "Email body",
	"vCard": "false",
	"vCardLocation": "",
	"signature": "false",
	"signatureLocation": "",
	"attachment": "true",
	"attachmentLocation": "/accounts/1000/removable/sdcard/My Files/file.dat"
};

Here's the usage for the getEmailAccounts() method:

// Build email JSON, dont' forget to parse it!
var emailAccounts = JSON.parse(community.emailsenderplugin.getEmailAccounts());

Here's the return format:

{
	"account1Id":"[email protected]",
	"account2Id":"[email protected]",
	"account3Id":"[email protected]",
	"account4Id":"[email protected]"
}

Associated email account:

    "From": "12345678" //id of an email account associated to [email protected]

Permissions

The plugin require the following permissions:

Known Issues

As of 09-Oct-2014, the plugin can't send email from a Microsoft account(hotmail, live, outlook, etc). 17-Nov-2014 - When sending emails as html, multiple lines are formatted into one continuous line.

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.