positive-outlook
Client for Microsoft Exchange Web Services
Last updated 4 years ago by r24y .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install positive-outlook 
SYNC missed versions from official npm registry.

positive-outlook

Join the chat at https://gitter.im/r24y/positive-outlook

Simple EWS client.

Installation

npm i --save positive-outlook

Usage


import ExchangeClient, { Folder, Mailbox, Message } from 'positive-outlook';

const client = new ExchangeClient({
  username: 'my-email@outlook.com',
  password: 'correct horse battery staple',
  domain: 'ADMIN',
  strictSSL: false,  // in case you can't trust the certs
});

client.on('ready', () => {
  const inbox = Folder.Inbox();
  client::inbox.list().then(response => {
    response.messages.forEach(m => {
      console.log(m.isRead === 'true' ? '          ' : ' [unread] ', m.subject);
    });
  });

  const recipients = Mailbox.fromAddresses([
    'foo@example.com',
    '"Brian Bar" <bar@example.com>',
  ]);

  const message = new Message({
    to: recipients,
    subject: 'Hello world',
    body: 'Sending email via Node.js',
  });

  client::message.send().catch(err => console.error(err));
});

The API should be considered very unstable at this point. Once I've wrapped my head around most of the EWS API then you can start expecting some stability.

If you can't use the "bind" notation (::) then you can call the methods, e.g.:

inbox.list.call(client).then(/* ... */);
message.send.call(client).catch(/* ... */);

Current Tags

  • 0.3.0                                ...           latest (4 years ago)

11 Versions

  • 0.3.0                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.10                                ...           4 years ago
  • 0.0.8                                ...           4 years ago
  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 11
Last Day 0
Last Week 11
Last Month 0
Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |