node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org ยป

intents-ses

Amazon Simple Email Service integration for Intents

This project is intented to use with Intents module.

Example as part of Intents

Details about Intents are at Intents project page

npm install intents

in Intents configuration at ./config/default.coffee:

ses = require 'intents-ses'

@mail = ses
  key: 'my-AWS-key'
  secret: 'my-AWS-secret'
  amazon: 'amazon end-point uri' # defaults to amazon east

in app code:

var mail = require('intents').mail;

mail.send({
  recipient: 'me@gmail.com',
  sender: 'no-reply@appload.pl',
  subject: 'Some subject',
  html: 'Some html',
  text: 'Alt text'}, function(error) {
    if(error) {
      console.error(error);
    }
  });

Example as standalone module

var ses = require('intents-ses');
var mail = ses({key: 'my-AWS-key', secret: 'my-AWS-secret'});

mail.send({
  recipient: 'me@gmail.com',
  sender: 'no-reply@appload.pl',
  subject: 'Some subject',
  html: 'Some html',
  text: 'Alt text'}, function(error) {
    if(error) {
      console.error(error);
    }
  });