0.0.8 • Published 3 years ago

imap-checker v0.0.8

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

mail checker

npm version

Check the IMAP server and return the first matching email.

How to use

var imapChecker = require('imap-checker');

const imapConfig = {
  user: "user@gmail.com",
  password: "password",
  host: "imap.gmail.com",
  port: 993,
  tls: true,
  tlsOptions: { rejectUnauthorized: false }
};

imapChecker.checkMail(imapConfig, {
  timeout: 30000,
  subject: '<subject>',
  to: 'john@gmail.com',
  from: 'bob@gmail.com',
  interval: 2000
})
.then(email => console.log('>>>', email));

Or in ES6:

import imapChecker from 'imap-checker';

const imapConfig = {
  user: "user@gmail.com",
  password: "password",
  host: "imap.gmail.com",
  port: 993,
  tls: true,
  tlsOptions: { rejectUnauthorized: false }
};

const email = await imapChecker.checkMail(imapConfig, {
  timeout: 30000,
  subject: '<subject>',
  to: 'john@gmail.com',
  from: 'bob@gmail.com',
  interval: 2000,
  since: 24 * 3600 * 1000,
  debug: true
});

console.log('>>>', email);

Different formats of email addresses are supported. For example, if you are looking for emails with sender's address as Joe Doe <joe@example.com>, just search it as joe@example.com.

0.0.6-2

3 years ago

0.0.6-1

3 years ago

0.0.8

3 years ago

0.0.6-3

3 years ago

0.0.7

3 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago