I run the same function today, and got the below msg:
"
.write(string, encoding, offset, length) is deprecated. Use write(string[, offse
t[, length]][, encoding]) instead.
Error: 501 5.5.2 Cannot Decode response n3sm42416148wix.10 - gsmtp Error: 501 5.
5.2 Cannot Decode response n3sm42416148wix.10 - gsmtp
at TLSSocket.<anonymous> (d:\Downloads\Downloads\attach\node_modules\partial
.js\mail.js:22:6795)
at TLSSocket.EventEmitter.emit (events.js:126:20)
at TLSSocket.<anonymous> (d:\Downloads\Downloads\attach\node_modules\partial
.js\mail.js:22:5542)
at TLSSocket.EventEmitter.emit (events.js:126:20)
at readableAddChunk (_stream_readable.js:156:16)
at TLSSocket.Readable.push (_stream_readable.js:123:10)
at TCP.onread (net.js:511:20)
--------------------------------------------------------------------
TypeError: Cannot call method 'emit' of null TypeError: Cannot call method 'emit
' of null
at TLSSocket.<anonymous> (d:\Downloads\Downloads\attach\node_modules\partial
.js\mail.js:22:5542)
at TLSSocket.EventEmitter.emit (events.js:126:20)
at readableAddChunk (_stream_readable.js:156:16)
at TLSSocket.Readable.push (_stream_readable.js:123:10)
at TCP.onread (net.js:511:20)
--------------------------------------------------------------------
"