When i tring to send email using nodemailer :
let transporter = nodemailer.createTransport({
debug:true,
logger:true,
host: "my.server.com",
port: 993,
secure: true,
auth: {
user: "noreply@test.com",
pass: "12345"
},
tls: {
rejectUnauthorized: false
}
});
the protocol is: imaps
I'm getting this error :
Error: Invalid greeting. response=* OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5] Dovecot ready.: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5] Dovecot ready.
at SMTPConnection._actionGreeting (/Users/ma/Documents/dev/emails/node_modules/nodemailer/lib/smtp-connection/index.js:1205:27)
at SMTPConnection._processResponse (/Users/ma/Documents/dev/emails/node_modules/nodemailer/lib/smtp-connection/index.js:947:20)
at SMTPConnection._onData (/Users/ma/Documents/dev/emails/node_modules/nodemailer/lib/smtp-connection/index.js:749:14)
at TLSSocket.SMTPConnection._onSocketData (/Users/ma/Documents/dev/emails/node_modules/nodemailer/lib/smtp-connection/index.js:189:44)
at TLSSocket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23) {
code: 'EPROTOCOL',
response: '* OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5] Dovecot ready.',
command: 'CONN'
}
Any help would be appreciated