ikmail

1.0.0 • Public • Published

Ikmail

A tiny librairy to send emails with nodejs, using Infomaniak smtp service.

Using ES6 modules. Not working with require().

Installation

npm install ikmail

Usage

import { Mailer } from 'ikmail'

const mailer = new Mailer('your@domainname.com', 'YourSuperStrongPassword001')
// param1: your email
// param2: your password

mailer.send('the@recipient.com', 'Name', 'Test', '<p>Test</p>', (res, data) => {
  console.log(res, data)
})
// param1: recipient email
// param2: your display name
// param3: email subject
// param4: email content ( html )
// param5: callback

Callback

Argument Type Description
res string Can be: 'error', 'sended' or 'retry'.
data any If res is 'error', data is the error. If res is 'sended', data are the informations. If res is 'retry', data is null

Callback: res

Value Description
'error' An error occured.
'sended' Email sended.
'retry' Email sended but with wrong informations.

License

MIT

/ikmail/

    Package Sidebar

    Install

    npm i ikmail

    Weekly Downloads

    7

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    2.59 kB

    Total Files

    3

    Last publish

    Collaborators

    • hold_mine