import { SmtpClient } from "https://deno.land/x/smtp/mod.ts";
type Smtp = {
host: string;
port: number;
user: string;
password: string;
};
export async function main(
smtp_res: Smtp,
to_email: string,
from_email: string,
subject: string,
content: string,
) {
const client = new SmtpClient();
await client.connectTLS({
hostname: smtp_res.host,
username: smtp_res.user,
port: smtp_res.port,
password: smtp_res.password
});
await client.send({
from: from_email,
to: to_email,
subject: subject,
content: content,
});
await client.close();
return `Email sent from ${from_email} to ${to_email}`;
}
Submitted by rubenfiszel 495 days ago
import { SmtpClient } from "https://deno.land/x/smtp/mod.ts";
type Smtp = {
host: string;
port: number;
user: string;
password: string;
};
export async function main(
smtp_res: Smtp,
to_email: string,
from_email: string,
subject: string,
content: string,
) {
const client = new SmtpClient();
await client.connectTLS(smtp_res);
await client.send({
from: from_email,
to: to_email,
subject: subject,
content: content,
});
await client.close();
return `Email sent from ${from_email} to ${to_email}`;
}
Submitted by rubenfiszel 495 days ago
import { SmtpClient } from "https://deno.land/x/smtp/mod.ts";
type Smtp = {
host: string;
port: number;
user: string;
password: string;
};
export async function main(
smtp_res: Smtp,
to_email: string,
from_email: string,
subject: string,
content: string,
) {
const client = new SmtpClient(smtp_res);
const connectConfig: any = client;
await client.connectTLS(client);
await client.send({
from: from_email,
to: to_email,
subject: subject,
content: content,
});
await client.close();
return `Email sent from ${from_email} to ${to_email}`;
}
Submitted by admin 497 days ago
import { SmtpClient } from "https://deno.land/x/smtp/mod.ts";
type Smtp = {
host: string;
port: number;
user: string;
password: string;
};
export async function main(smtp_res: Smtp, to_email: string, from_email: string, subject: string, content: string) {
const client = new SmtpClient(smtp_res);
const connectConfig: any = client;
await client.connectTLS(client);
await client.send({
from: from_email,
to: to_email,
subject: subject,
content: content,
});
await client.close();
return `Email sent from ${from_email} to ${to_email}`;
}
Submitted by admin 500 days ago
import * as wmill from "https://deno.land/x/windmill@v1.85.0/mod.ts";
import { SmtpClient } from "https://deno.land/x/smtp/mod.ts";
export async function main(smtp_res: wmill.Resource<"smtp">, to_email: string, from_email: string, subject: string, content: string) {
const client = new SmtpClient(smtp_res);
const connectConfig: any = client;
await client.connectTLS(client);
await client.send({
from: from_email,
to: to_email,
subject: subject,
content: content,
});
await client.close();
return `Email sent from ${from_email} to ${to_email}`;
}
Submitted by adam186 626 days ago
import * as wmill from "https://deno.land/x/windmill@v1.85.0/index.ts";
import { SmtpClient } from "https://deno.land/x/smtp/mod.ts";
export async function main(smtp_res: wmill.Resource<"smtp">, to_email: string, from_email: string, subject: string, content: string) {
const client = new SmtpClient(smtp_res);
const connectConfig: any = client;
await client.connectTLS(client);
await client.send({
from: from_email,
to: to_email,
subject: subject,
content: content,
});
await client.close();
return `Email sent from ${from_email} to ${to_email}`;
}
Submitted by adam186 628 days ago
import * as wmill from "https://deno.land/x/windmill@v1.13.0/index.ts";
import { SmtpClient } from "https://deno.land/x/smtp/mod.ts";
export async function main(smtp_res: wmill.Resource<"smtp">, to_email: string, from_email: string, subject: string, content: string) {
const client = new SmtpClient(smtp_res);
const connectConfig: any = client;
await client.connectTLS(client);
await client.send({
from: from_email,
to: to_email,
subject: subject,
content: content,
});
await client.close();
return `Email sent from ${from_email} to ${to_email}`;
}
Submitted by adam186 663 days ago
import * as wmill from "https://deno.land/x/windmill@v1.13.0/index.ts";
import { SmtpClient } from "https://deno.land/x/smtp/mod.ts";
export async function main(smtp_res: wmill.Resource<"smtp">, to_email: string, from_email: string, subject: string, content: string) {
const client = new SmtpClient(smtp_res);
const connectConfig: any = client;
await client.connectTLS(client);
await client.send({
from: from_email,
to: to_email,
subject: subject,
content: content,
});
await client.close();
return `Email sent from ${from_email} to ${to_email}`;
}
Submitted by admin 859 days ago
import * as wmill from "https://deno.land/x/windmill@v1.13.0/index.ts";
import { SmtpClient } from "https://deno.land/x/smtp/mod.ts";
export async function main(smtp_res: wmill.Resource<"email_smtp">, to_email: string, from_email: string, subject: string, content: string) {
const client = new SmtpClient(smtp_res);
const connectConfig: any = client;
await client.connectTLS(client);
await client.send({
from: from_email,
to: to_email,
subject: subject,
content: content,
});
await client.close();
return `Email sent from ${from_email} to ${to_email}`;
}
Submitted by admin 859 days ago