我刚刚开始学习deno,并尝试使用它发送邮件。
import { SmtpClient } from "./deps.js";
await client.connectTLS({
host: "smtp.163.com",
port: 465,
username: "my email",
password: "my password",
});
await client.send({
from: "[email protected]",
to: "[email protected]",
subject: "Mail Title",
content: "Mail Content,maybe HTML",
});
我按照SmtpClient docs中的说明进行了所有操作>
但是我得到一个错误
error: Uncaught ConnectionRefused: No connection could be made because the target machine actively refused it. (os error 10061)
at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
at Object.sendAsync ($deno$/ops/dispatch_json.ts:98:10)
at async Object.connectTls ($deno$/tls.ts:20:15)
at async SmtpClient.connectTLS (https://deno.land/x/smtp/smtp.ts:36:18)
at async file:///C:/.../controller.js:28:1
我刚刚开始学习deno,并尝试使用它发送邮件。从“ ./deps.js”导入{SmtpClient};等待client.connectTLS({主机:“ smtp.163.com”,端口:465,用户名:“我的电子邮件”,...
“连接被拒绝”消息几乎总是解决以下两种可能性之一: