Answer the question
In order to leave comments, you need to log in
How to solve Socket timed out error on emailjs-smtp-client?
Greetings fellow colleagues.
There is npm emailjs-smtp-client.
It has emailjs-tcp-socket as a dependency.
There is a project in VUE on the side, everything is assembled by webpack so that everything works in conjunction with VUE on the front.
It causes the following error in the browser:
Uncaught (in promise) TypeError: this.socket.send is not a function
at SmtpClient._send (client.js?00c3:486)
at SmtpClient._sendCommand (client.js?00c3:480)
at SmtpClient.quit (client.js ?00c3:177)
at eval (VM5894 761:276)
at
_send @ client.js?00c3:486
_sendCommand @ client.js?00c3:480
quit @ client.js?00c3:177
fn._withTask.fn._withTask @ vue .esm.js?65d7:1826
VM5894 761:269 Error: Socket timed out!
at SmtpClient._onTimeout(client.js?00c3:419)
options = {
auth: {
user: mail.mail,
pass: mail.pass,
ca: true,
ignoreTLS: false,
requireTLS: true,
},
};
client = new SmtpClient(mail.host, 587, options);
client.onidle = () => {
console.log('Connection has been established');
if (alreadySending) { return; }
alreadySending = true;
client.useEnvelope({
from: mail.mail,
to: mail.mail,
});
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question