0.3.1 • Published 7 years ago

sendcloud-client v0.3.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

sendcloud-client

Build Status Coverage Status

Node.js client for http://sendcloud.sohu.com.

Support send mails in sync way.

Install

$ npm install sendcloud-client

Usage

Init

const SendCloud = require('sendcloud-client');

const client = new SendCloud({
  from: 'mail from',
  apiUser: 'your api user',
  apiKey: 'your api key'
});

Send

// send mail
const options = {
  to: [ 'baijuyi@gmail.com', 'lishangyin@qq.com' ],
  subject: '晚上来我家吃饭吧!',
  html: '老婆做了东坡肉,与大家一起分享!'
};

const res = yield client.send(options);
console.log(res);
// {
//    result: true,
//    statusCode: 200,
//    message: '请求成功',
//    info: {
//      emailIdList: [
//        '1426053463570_15_32087_2059.sc-10_10_127_105-inbound0$baijuyi@gmail.com',
//        '1426053463570_15_32087_2059.sc-10_10_127_105-inbound3$lishangyin@qq.com'
//      ]
//    }
// }
0.3.1

7 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago