@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

Node.jsでメールを送る。mailコマンドやSMTPサーバー不要。

github.com

npm i sendmail

const sendmail = require('sendmail')();

sendmail({
  from: 'from@example.com',
  to: 'to@exampl.com',
  subject: '件名も化けなかった',
  text: 'これは本文'
}, function(err, reply) {
  console.log(err && err.stack);
  console.dir(reply);
});

実態は送信先メールアドレスに対して直接SMTPを喋っている様子。 ローカルのmailコマンドやSMTPサーバーに依存しない。