https://github.com/yourtion/node-smtp-auth
Auth user from smtp server
https://github.com/yourtion/node-smtp-auth
Last synced: about 1 year ago
JSON representation
Auth user from smtp server
- Host: GitHub
- URL: https://github.com/yourtion/node-smtp-auth
- Owner: yourtion
- License: mit
- Created: 2018-05-07T08:47:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-08T01:31:11.000Z (over 8 years ago)
- Last Synced: 2025-06-09T18:49:18.536Z (about 1 year ago)
- Language: TypeScript
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-smtp-auth
Auth user from smtp server
more info: [使用SMTP服务进行用户登录认证](https://blog.yourtion.com/auth-user-from-smtp-on-nodejs.html)
## Install
```bash
$ npm install smtp-auth --save
```
## How to use
```javascript
const SMTPAuth = require("smtp-auth");
const client = new SMTPAuth({
host: "smtp.163.com",
port: 25,
});
client.auth("test@extmail.org", "test").then(() => {
console.log("login success")
}).catch((err) => {
console.log("login fail: ", err)
});
```