node_mailer icon indicating copy to clipboard operation
node_mailer copied to clipboard

Fails with nodemailer 0.2.0

Open pacovell opened this issue 13 years ago • 8 comments

SMTPClient is removed from nodemailer 0.2.0, causing havoc.

pacovell avatar Aug 17 '11 14:08 pacovell

I believe I'm having problems with the recent update too!

TypeError: undefined is not a function at CALL_NON_FUNCTION_AS_CONSTRUCTOR (native) at SMTPClientPool.addClient (/Users/chris/node_modules/mailer/lib/node_mailer.js:38:44) at Object.node_mail as send (/Users/chris/node_modules/mailer/lib/node_mailer.js:100:10)

cojohn avatar Aug 18 '11 04:08 cojohn

+1

@gasi and I ran into this too. An easy short-term fix is to tighten the dependency in package.json to require "0.1.x >= 0.1.10" instead of just ">= 0.1.10". This is a best practice anyway w.r.t. semver anyway -- 0.1 to 0.2 means breaking changes.

Thanks in advance for fixing this.

aseemk avatar Aug 19 '11 01:08 aseemk

+1 I did try to use a old version but "Error: 503 Already authenticated", I gonna try to downgrade all dependecies :(

tcha-tcho avatar Aug 22 '11 22:08 tcha-tcho

@tcha-tcho, the way we worked around this was: in your package.json, put your own explicit "nodemailer" dependency for "0.1.x", npm uninstall nodemailer, then re-npm install/link/bundle/whatever your project.

Important: this nodemailer dependency needs to be before your regular "mailer" dependency, so that the 0.1.x version of nodemailer gets installed, and then this project's nodemailer dependency is already met.

Hope that helps.

aseemk avatar Aug 22 '11 22:08 aseemk

@aseemk hi, humm Im testing versions and don't think seems to be a nodemailer problem... It seems to be a mailer problem....

mailer has nodemailer as dependency? I did fall back the version of mailer to 0.4.x and all works again... even with nodemailer 2.0 activated ... strange

tcha-tcho avatar Aug 22 '11 23:08 tcha-tcho

fix: https://github.com/Marak/node_mailer/pull/43

balupton avatar Aug 23 '11 08:08 balupton

I'm the author of nodemailer. With 0.2.0 there was a change that introduced ability to use different backends for sending mail besides SMTP (like Amazon SES etc) and thus SMTPClient was hidden under a engine selection layer. I'm not very familiar with node_mailer and how it actually uses nodemailer so I wasn't able to foresee the impact to it from the change. Sorry for that.

andris9 avatar Aug 23 '11 14:08 andris9

[deleted] Oops, meant to comment this on the pull request.

aseemk avatar Oct 15 '11 00:10 aseemk