DenoDDeno
Powered by
sousadiego11S
Denoโ€ข3y agoโ€ข
9 replies
sousadiego11

Help using DenoMailer

i'm trying to use it but i get Deno is not defined when i try to send the email, any tips? how would you approach it?

import { SMTPClient } from "https://deno.land/x/denomailer@1.6.0/mod.ts";
import { IRelatoForm } from "../../types/index.ts";


export async function send(form: IRelatoForm) {
  const client = new SMTPClient({
    connection: {
      hostname: "smtp.gmail.com",
      port: 465,
      tls: true,
      auth: {
        username: "test.test@gmail.com",
        password: "test",
      },
    },
  });
  await client.send({
    from: "test.test@gmail.com",
    to: "test@test.com.br",
    subject: "TESTE FRESH MAIL",
    content: "conteudo teste",
    html: `<p>${JSON.stringify(form)}</p>`,
  });
  
  await client.close();
}
import { SMTPClient } from "https://deno.land/x/denomailer@1.6.0/mod.ts";
import { IRelatoForm } from "../../types/index.ts";


export async function send(form: IRelatoForm) {
  const client = new SMTPClient({
    connection: {
      hostname: "smtp.gmail.com",
      port: 465,
      tls: true,
      auth: {
        username: "test.test@gmail.com",
        password: "test",
      },
    },
  });
  await client.send({
    from: "test.test@gmail.com",
    to: "test@test.com.br",
    subject: "TESTE FRESH MAIL",
    content: "conteudo teste",
    html: `<p>${JSON.stringify(form)}</p>`,
  });
  
  await client.close();
}
image.png
image.png
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Using proxies
medison ๐“‚ƒ เฃชห– ึดึถึธ๐Ÿ‡เผ‹เผ˜เฟMmedison ๐“‚ƒ เฃชห– ึดึถึธ๐Ÿ‡เผ‹เผ˜เฟ / help
7mo ago
Using express
Marwan RabbaaMMarwan Rabbaa / help
10mo ago