Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

An Amazon SES api for nodejs with your favorite promise library

License

Notifications You must be signed in to change notification settings

haoliangyu/node-ses-any-promise

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[DEPRECATED] node-ses-any-promise

This is a fork of node-ses with any-promise support. No feature is added or removed.

All functions that require callback function in the original project now return a promise:

// register your favorite promise library, default would be the native global promise
require('any-promise/register/bluebird');

var ses = require('node-ses-any-promise');
var client = ses.createClient({ key: 'key', secret: 'secret' });

// Give SES the details and let it construct the message for you.
client.sendEmail({
  to: 'aaron.heckmann+github@gmail.com',
  from: 'somewhereOverTheR@inbow.com',
  cc: 'theWickedWitch@nerds.net',
  bcc: ['canAlsoBe@nArray.com', 'forrealz@.org'],
  subject: 'greetings',
  message: 'your <b>message</b> goes here',
  altText: 'plain text'
};
.then(function(data, res) {
  // do something
})
.catch(function(err) {
  // do something
});

// ... or build a message from scratch yourself and send it.
client.sendRawEmail({
  from: 'somewhereOverTheR@inbow.com',
  rawMessage: rawMessage
})
.then(function(data, res) {
  // do something
})
.catch(function(err) {
  // do something
});

For more detial, see the documentation of node-ses and any-promise.

Licence

MIT

About

An Amazon SES api for nodejs with your favorite promise library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.4%
  • Makefile 0.6%