Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

posteon

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

posteon

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

#Posteon NPM version

** Pre-alpha version **

Description

A provider indipendent email module, based on mongoDB.

This software is released under the MIT license. See LICENSE for more details

Supported providers

Download and Installation

From the command line

$ npm install posteon

package.json

dependencies: {
  ...
  "": "*$version*",
  ...
}
...

Example use

var posteon = require('posteon');

posteon.init({
	dbs: {
		mongoDB: {
			uri: 'mongodb://localhost/mailer-dev',
			debug: false,
			options: {},
		},
	},
	lockTime: 60 * 1000,
});

var options = {
	provider: {
		name: 'sendgrid',
		apiKey: YOUR_APIKEY
	},
	options: {
		to: {

		}
	}
};

posteon.send(options, function (err, message) {
	...
});

Send options


var options = {
  provider: {
    name: 'sendgrid',
    apiKey: 'YOUR_APIKEY'
  },
  to: [{
    email: 'to@email.com',
    name: 'Jack Smith',
    data: {
      name: 'Jack Smith'
    }
    metadata: {
      userId: '1345698abcd'
    }
  }],
  from: {
    name: 'Mailer',
    email: 'from@email.com'
  }
  subject: 'Email subject',
  html: '<h1>Html body</h1>',
  text: 'text body',
  attachments: [
    {
      name: 'file.txt',
      content: Buffer,
      contentType: 'text/plain',//MIME Type
    }
  ],
  images: [
    {
      name: 'picture.png',
      content: Buffer,      
    }
  ],
  tags: ['tag_1', 'tag_2'],
  headers: {
    'X-Replay-To': 'replay@email.com',
  },
  metadata: {
    appId: 'x895r5t',
  },

  //other provider specific options
}

Keywords

FAQs

Package last updated on 08 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc