Git Product home page Git Product logo

node-ses's Introduction

#node-ses

An Amazon SES api for nodejs with proper error handling.

This module implements the SendEmail action only. What more do you need? ;)

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

client.sendemail({
   to: '[email protected]'
 , from: '[email protected]'
 , cc: '[email protected]'
 , bcc: ['[email protected]', '[email protected]']
 , subject: 'greetings'
 , message: 'your <b>message</b> goes here'
 , altText: 'plain text'
}, function (err, data, res) {
 // ...
});

install

npm install node-ses

The module has one primary export:

##createClient()

You'll probably only be using this method. It takes an options object with the following properties:

`key` - (required) your AWS SES key
`secret` - (required) your AWS SES secret
`algorithm` - [optional] the AWS algorithm you are using. defaults to SHA1.
`amazon` - [optional] the amazon end-point uri. defaults to amazon east.
var ses = require('node-ses')
  , client = ses.createClient({ key: 'key', secret: 'secret' });

The client created has one method, sendemail. This method receives an options object with the following properties:

`from` - email address from which to send
`subject` - string
`message` - can be html
`altText` - plain text version of message
`to` - email address or array of addresses
`cc` - email address or array of addresses
`bcc` - email address or array of addresses
`replyTo` - email address

Optional properties (overrides the values set in createClient):

`key` - AWS key
`secret` - AWS secret
`algorithm` - AWS algorithm to use
`amazon` - AWS end point

The sendmail method transports your message to the AWS SES service. Check for errors returned since a 400 status is not uncommon.

tests

make test

Licence

MIT

node-ses's People

Contributors

aheckmann avatar jessetane avatar

Watchers

Mark Stosberg avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.