A tiny librairy to send emails with nodejs, using Infomaniak smtp service. Using modules.
npm install ikmailA tiny librairy to send emails with nodejs, using Infomaniak smtp service.
Using ES6 modules. Not working with require().
``bash`
npm install ikmail
`javascript
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', '
Test
', (res, data) => {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. |