无法连接到SMTP服务器端

时间:2020-05-31 21:29:41

标签: javascript email smtp deno

我对deno很陌生,我正在尝试使用模块smtp-client来发送邮件。

Globals:
  Function:
    Timeout: 30

但是在尝试发出请求(import { SmtpClient } from "https://deno.land/x/smtp/mod.ts"; const client = new SmtpClient(); await client.connect({ // this is the line where error is thrown host: "smtp.google.com", port: 465, username: "<MY EMAIL>", password: "<MY EMAIL PASSWORD>", }); // etc... )之前,它给了我一个错误。

sendMail

1 个答案:

答案 0 :(得分:0)

gamil的smtp服务器(AFAIK)是smtp.gmail.com

然后,您必须在gmail“ Less Secure Applications”上激活,以允许smtp客户端进行连接