CNode

发布一个发邮件的module, 无需 SMTP server

Gguilin发布于14 年前最后回复13 年前2 回复6178 浏览0 收藏

去年写的, 一直没有publish到npm

https://github.com/guileen/node-sendmail

npm install sendmail

var sendmail = require('sendmail').sendmail;

sendmail({
    from: 'test[@yourdomain](/user/yourdomain).com',
    to: 'test[@qq](/user/qq).com, test[@sohu](/user/sohu).com, test[@163](/user/163).com ',
    subject: 'test sendmail',
    content: 'Mail of test sendmail ',
  }, function(err, reply) {
    console.log(err && err.stack);
    console.dir(reply);
});

虽然无需SMTP服务器, 但最好还是将域名的MX记录配置与发送地址匹配, 以免被视为垃圾邮件.

查看回复

回复 (2)

W
willwen#1·14 年前

这货不错!

A
apple601601601#2·13 年前

不错的东西,不过如果个人用户的IP发邮件的话很多会因为各种各样的原因被拒收,比如查不到反向域名之类。。。

参与回复
登录后即可参与回复。登录