simple smtp client and server for node.js
$ npm install smtp2
smtp client:
smtp.send({
from: 'mail@lsong.org',
to: 'hi@lsong.org',
subject: 'hello world',
body: 'This is a test message, do not reply.'
}).then(res => console.log(res));
smtp server:
const smtp = require('smtp2');
const server = smtp.createServer();
server.on('client', client => {
console.log('Client connected');
client.on('QUIT', () => {
console.log('Client disconnect');
});
});
server.on('message', message => {
console.log('Incoming Message:', message);
});
server.listen(2525);
- Fork this Repo first
- Clone your Repo
- Install dependencies by
$ npm install
- Checkout a feature branch
- Feel free to add your features
- Make sure your features are fully tested
- Publish your local branch, Open a pull request
- Enjoy hacking <3
This work is licensed under the MIT license.