Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zengming00/node-sendmail-lite

a 100% js sendmail, it is very simple useful, but only support send html formart email, and it does not depend anything, 最简单最容易使用并且不依赖环境的nodejs发送邮件包
https://github.com/zengming00/node-sendmail-lite

Last synced: about 1 month ago
JSON representation

a 100% js sendmail, it is very simple useful, but only support send html formart email, and it does not depend anything, 最简单最容易使用并且不依赖环境的nodejs发送邮件包

Awesome Lists containing this project

README

        

# node-sendmail-lite
a 100% js sendmail, it is very simple useful, but only support send html formart email, and it does not depend anything

**It can running in any platform**

# install
npm install sendmail-lite --save

# demo

```js
var sendMail = require('sendmail-lite').sendMail;

var $content = '\
\
\

\
\

helloworld,这是一封测试邮件,' + new Date() + '

\
\
马上激活
\
\
\
\
\
';

// 如果你收不到邮件,那可能是被拦截了,(QQ邮箱->收件箱上面点右键->收件查询)
// 只测试了163和QQ邮箱,测试时请反下面的邮箱地址换成你自己的
// $to = "[email protected]";
var $to = "[email protected]";

var $senderName="这是发件人";
var $sender="[email protected]";
var $subject="这是邮件标题";

sendMail($senderName, $sender, $to, $subject, $content, function (err) {
if(err) return console.log(err);
console.log('发送成功');
});
```
# typescript support
```typescript
import { sendMail } from 'sendmail-lite';
```

# can not receive mail ?

Because Mail is intercepted

# License
MIT