Socket
Socket
Sign inDemoInstall

skiff-dispatcher-smtp

Package Overview
Dependencies
421
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    skiff-dispatcher-smtp

Provides 2 pluggable RPC calls: one generates smtp pool, and the other is responsible for generating smtp access credentials cache


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Skiff dispatcher SMTP

Plugin for skiff-dispatcher, adds methods for handling distributed email messaging

Install

npm install skiff-dispatcher skiff-dispatcher-smtp -S

Usage

var Dispatcher = require('skiff-dispatcher');
var DispatcherSMTP = require('skiff-dispatcher-smtp');

DispatcherSMTP.init({
    gmail: {
        clientId: '<your client id>',
        clientSecret: '<your client secret>',
        accessUrl: '<optional>'
    },
    yahoo: {
        // ...
    }
});

// create dispatcher cluster
var dispatcher = new Dispatcher(...);

// defined this on the dispatcher object, since it can not be called remotely
dispatcher.function_to_preprocess_emails = function (username, email, next) {
    // do async preprocessing here
    // next(err, processedEmail)
};

// call the method
dispatcher.sendMail('v@aminev.me', {
    credentials: {
        // ...
    },
    email {
        // nodemailer email options
    },
    prepareEmailFunctionName: 'function_to_preprocess_emails'
}, function (err, info) {
    // ...
});

Keywords

FAQs

Last updated on 05 May 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc