I'm trying to send and email using SmtpClient from deno, and configuring it using gmail app password. strange thing is when i serve the function locally emails get sent but once deployed i get the following error in the function logs
TypeError: Deno.writeAll is not a function
at BufWriter.flush (https://deno.land/[email protected]/io/bufio.ts:394:24)
at SmtpClient.writeCmd (https://deno.land/x/[email protected]/smtp.ts:125:28)
at eventLoopTick (ext:core/01_core.js:183:11)
at async SmtpClient._connect (https://deno.land/x/[email protected]/smtp.ts:82:9)
at async SmtpClient.connectTLS (https://deno.land/x/[email protected]/smtp.ts:39:9)
at async Server.<anonymous> (file:///src/index.ts:847:9)
at async Server.#respond (https://deno.land/[email protected]/http/server.ts:221:24)
i tried wrapping every dangerous operations in try catch block no errors return except the on i find in logs
I had the same problem and found a solution here: https://deno.land/x/[email protected]
This is how to implement it