Marak / node_mailer

## Project deprecated, see README
MIT License
387 stars 64 forks source link

Fails with nodemailer 0.2.0 #41

Open pacovell opened 13 years ago

pacovell commented 13 years ago

SMTPClient is removed from nodemailer 0.2.0, causing havoc.

cojohn commented 13 years ago

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)

aseemk commented 13 years ago

+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.

tcha-tcho commented 13 years ago

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

aseemk commented 13 years ago

@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.

tcha-tcho commented 13 years ago

@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

balupton commented 13 years ago

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

andris9 commented 13 years ago

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.

aseemk commented 13 years ago

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