https://github.com/lsongdev/node-smtp
:mailbox: simple smtp client and server for node.js
https://github.com/lsongdev/node-smtp
networking smtp smtp-client smtp-protocol smtp-server
Last synced: 29 days ago
JSON representation
:mailbox: simple smtp client and server for node.js
- Host: GitHub
- URL: https://github.com/lsongdev/node-smtp
- Owner: lsongdev
- License: mit
- Created: 2018-09-15T15:39:40.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-02T06:23:06.000Z (almost 6 years ago)
- Last Synced: 2025-09-06T07:52:32.390Z (30 days ago)
- Topics: networking, smtp, smtp-client, smtp-protocol, smtp-server
- Language: JavaScript
- Homepage: https://npmjs.org/smtp2
- Size: 5.86 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## smtp2
> simple smtp client and server for node.js
[](https://npmjs.org/smtp2)
[](https://travis-ci.org/song940/smtp2)### Installation
```bash
$ npm install smtp2
```### Example
smtp client:
```js
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:
```js
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);
```### Contributing
- 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### MIT
This work is licensed under the [MIT license](./LICENSE).
---