nodemailerで認証周りでエラーになる件が直ってた
なんか前回Sendgridではまりまくった件、やっぱり使ってたモジュールが原因だったっぽい。
SendGridのSMTPではまる - hokaccha.hamalog v2
なんかこういうエラーがでてた。
events.js:45
throw arguments[1]; // Unhandled 'error' event
^
Error: 503 Already authenticated
at SMTPClient._dataListener (/Users/hokamura/tmp/sendgrid/node_modules/mailer/node_modules/nodemailer/lib/smtp.js:466:29)
at SMTPClient.<anonymous> (/Users/hokamura/tmp/sendgrid/node_modules/mailer/node_modules/nodemailer/lib/smtp.js:643:14)
at CleartextStream.<anonymous> (native)
at CleartextStream.emit (events.js:64:17)
at CleartextStream._push (tls.js:287:12)
at SecurePair._cycle (tls.js:565:20)
at EncryptedStream.write (tls.js:97:13)
at Socket.ondata (stream.js:40:26)
at Socket.emit (events.js:81:20)
at Socket._onReadable (net.js:676:14で、今日モジュールのバージョン最新にして試して見たらうまくいった。この前試したときのバージョンに戻してみたら同じエラーになったので、モジュールが修正されたっぽい。たぶんこのコミット。
Allow TLS authentication failures (mostly untrusted certs etc.); alwa… · nodemailer/nodemailer@47dbc2d · GitHub
nodemailerの0.1.18以下で起きた問題で、0.1.19以上では大丈夫みたい。