xpepermint / smtp-client

Simple, promisified, protocol-based SMTP client for Node.js.
36 stars 13 forks source link

lib.connect is not a function #2

Open mjagyo opened 7 years ago

mjagyo commented 7 years ago

great lib, I'm having this error can you help me on this one?


TypeError: lib.connect is not a function
    at ./node_modules/smtp-client/src/index.js.exports.SMTPClient._createSocket (http://localhost:3000/static/js/bundle.js:50093:16)
    at Promise (http://localhost:3000/static/js/bundle.js:50113:27)
    at Promise (<anonymous>)
    at ./node_modules/smtp-client/src/index.js.exports.SMTPClient._connectAsPromised (http://localhost:3000/static/js/bundle.js:50106:12)
    at ./node_modules/smtp-client/src/index.js.exports.SMTPClient.connect (http://localhost:3000/static/js/bundle.js:50007:21)
    at ./node_modules/smtp-client/src/index.js.exports.SMTPClient.connect (http://localhost:3000/static/js/bundle.js:50462:18)
    at Object._callee$ (http://localhost:3000/static/js/bundle.js:57825:16)
    at tryCatch (http://localhost:3000/static/js/bundle.js:48840:40)
    at Generator.invoke [as _invoke] (http://localhost:3000/static/js/bundle.js:49078:22)
    at Generator.prototype.(anonymous function) [as next] (http://localhost:3000/static/js/bundle.js:48892:21)
    at step (http://localhost:3000/static/js/bundle.js:57787:191)
    at http://localhost:3000/static/js/bundle.js:57787:437
    at Promise (<anonymous>)
    at http://localhost:3000/static/js/bundle.js:57787:99
    at sendMail (http://localhost:3000/static/js/bundle.js:57857:5)
    at Object.sendMail (http://localhost:3000/static/js/bundle.js:48145:35)
    at Login.autheticateEmail (http://localhost:3000/static/js/bundle.js:57373:20)
    at Object../node_modules/react-dom/lib/ReactErrorUtils.js.ReactErrorUtils.invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:29267:16)
    at executeDispatch (http://localhost:3000/static/js/bundle.js:22840:21)
    at Object.executeDispatchesInOrder (http://localhost:3000/static/js/bundle.js:22863:5)
    at executeDispatchesAndRelease (http://localhost:3000/static/js/bundle.js:22249:22)
    at executeDispatchesAndReleaseTopLevel (http://localhost:3000/static/js/bundle.js:22260:10)
    at Array.forEach (<anonymous>)
    at forEachAccumulated (http://localhost:3000/static/js/bundle.js:35316:9)
    at Object.processEventQueue (http://localhost:3000/static/js/bundle.js:22460:7)
    at runEventQueueInBatch (http://localhost:3000/static/js/bundle.js:29302:18)
    at Object.handleTopLevel [as _handleTopLevel] (http://localhost:3000/static/js/bundle.js:29312:5)
    at handleTopLevelImpl (http://localhost:3000/static/js/bundle.js:29400:24)
    at ReactDefaultBatchingStrategyTransaction.perform (http://localhost:3000/static/js/bundle.js:34512:20)
    at Object.batchedUpdates (http://localhost:3000/static/js/bundle.js:29012:26)
    at Object.batchedUpdates (http://localhost:3000/static/js/bundle.js:32449:27)
    at dispatchEvent (http://localhost:3000/static/js/bundle.js:29475:20)```
xpepermint commented 7 years ago

Please post your code here and I'll see what I can do.

Dr8g0n commented 7 years ago

Same error. Here is my code:

let s = new SMTPClient({
    host: 'mailrelay.blabla.com',
    port: 25
});

(async function() {
                await s.connect();
                await s.greet({hostname: 'access-ui.prod.blabla.net'}); // runs EHLO command or HELO as a fallback
                await s.mail({from: 'blabla-ui@blabla.com'}); // runs MAIL FROM command
                await s.rcpt({to: 'tl@blabla.com'}); // runs RCPT TO command (run this multiple times to add more recii)
                await s.data('mail source'); // runs DATA command and streams email source
                await s.quit(); // runs QUIT command
            })().catch(console.error);
artemavrin commented 6 years ago

I have same error. Code from example with my params.

DavidDuvernay commented 2 years ago

having same issue with same code sample.

davbauer commented 6 months ago

Issue still persisting, using wrangler..

basil-1112 commented 6 months ago

same issue