Albert [tox/cis]
04/01/2022, 12:18 PMNeedle
04/01/2022, 12:18 PM/title
command!
We have solved your problem?
Click the button below to archive it.Albert [tox/cis]
04/01/2022, 12:20 PMTimedOut: Connection timed out (os error 110) at async Object.connect (deno:ext/net/01_net.js:323:17) at async SmtpClient.connect (file:///src/main.ts:721:22) at async Server. (file:///src/main.ts:838:5) at async Server.#respond (file:///src/main.ts:111:24)
sylar815
04/01/2022, 12:21 PMNeedle
04/01/2022, 12:21 PMAlbert [tox/cis]
04/01/2022, 12:22 PMjs
import { serve } from "https://deno.land/std@0.131.0/http/server.ts"
import { SmtpClient } from "https://deno.land/x/smtp@v0.7.0/mod.ts";
serve(async (req) => {
console.log('creating connection');
const client = new SmtpClient();
await client.connect({
hostname: "mymailserver",
port: 465,
username: "myemail",
password: "mypassword"
});
console.log('sending e-mail');
await client.send({
from: "myemail",
to: "myprivateemail",
subject: "Mail Title",
content: "Mail Content, maybe HTML"
});
console.log('sent e-mail');
await client.close();
return new Response(
JSON.stringify({'hello': 'çiao'}),
{ headers: { "Content-Type": "application/json" } },
);
});
sylar815
04/01/2022, 12:24 PMsylar815
04/01/2022, 12:24 PMAlbert [tox/cis]
04/01/2022, 12:25 PMAlbert [tox/cis]
04/01/2022, 12:25 PMAlbert [tox/cis]
04/01/2022, 12:25 PMsylar815
04/01/2022, 12:26 PMsylar815
04/01/2022, 12:28 PMawait client.connectTLS({
hostname: "smtp.gmail.com",
port: 465,
username: "your username",
password: "your password",
});
sylar815
04/01/2022, 12:28 PMsylar815
04/01/2022, 12:29 PMAlbert [tox/cis]
04/01/2022, 12:44 PMgaryaustin
04/01/2022, 1:05 PMAlbert [tox/cis]
04/01/2022, 1:28 PMAlbert [tox/cis]
04/01/2022, 1:29 PMgaryaustin
04/01/2022, 1:32 PMAlbert [tox/cis]
04/01/2022, 7:36 PMgaryaustin
04/01/2022, 7:40 PMAlbert [tox/cis]
04/01/2022, 8:25 PMsylar815
04/02/2022, 3:44 AMgaryaustin
04/02/2022, 9:50 PM