Skip to main content
Home

@xtool/smtp@0.1.0

latest

一个发送邮件的库。

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
70%
Published
a year ago (0.1.0)

smtp

smtp is a simple module that send email.

Examples

first new a ts file named test.ts.

import { SmtpClient } from "@xtool/smtp";

const client = new SmtpClient();
await client.connect({
  hostname: "smtp.163.com",
  port: 465,
  username: "username",
  password: "password",
  tls: true,
});

await client.send({
  from: "username@163.com",
  to: "shoujianren@qq.com",
  subject: `Email Test`,
  content: "Mail Content",
  html: 'hello world'
});

then run the below command:

# install the module
$ deno add @xtool/smtp

# run the test.ts
$ deno run test.ts

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@xtool/smtp

Import symbol

import * as smtp from "@xtool/smtp";
or

Import directly with a jsr specifier

import * as smtp from "jsr:@xtool/smtp";

Add Package

pnpm i jsr:@xtool/smtp
or (using pnpm 10.8 or older)
pnpm dlx jsr add @xtool/smtp

Import symbol

import * as smtp from "@xtool/smtp";

Add Package

yarn add jsr:@xtool/smtp
or (using Yarn 4.8 or older)
yarn dlx jsr add @xtool/smtp

Import symbol

import * as smtp from "@xtool/smtp";

Add Package

vlt install jsr:@xtool/smtp

Import symbol

import * as smtp from "@xtool/smtp";

Add Package

npx jsr add @xtool/smtp

Import symbol

import * as smtp from "@xtool/smtp";

Add Package

bunx jsr add @xtool/smtp

Import symbol

import * as smtp from "@xtool/smtp";