Skip to main content
Home

@upyo/smtp@0.3.1
Built and signed on GitHub Actions

SMTP transport for Upyo email library

This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
2 weeks ago (0.3.1)
method SmtpTransport.prototype.send
SmtpTransport.prototype.send(
message: Message,
options?: TransportOptions,
): Promise<Receipt>

Sends a single email message via SMTP.

This method converts the message to SMTP format, establishes a connection to the SMTP server, sends the message, and returns a receipt with the result.

Examples

Example 1

const receipt = await transport.send({
  sender: { address: 'from@example.com' },
  recipients: [{ address: 'to@example.com' }],
  subject: 'Hello',
  content: { text: 'Hello World!' }
});

if (receipt.successful) {
  console.log('Message sent with ID:', receipt.messageId);
}

Parameters

message: Message

The email message to send.

optional
options: TransportOptions

Optional transport options including AbortSignal for cancellation.

Return Type

Promise<Receipt>

A promise that resolves to a receipt indicating success or failure.

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:@upyo/smtp

Import symbol

import { SmtpTransport } from "@upyo/smtp";
or

Import directly with a jsr specifier

import { SmtpTransport } from "jsr:@upyo/smtp";

Add Package

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

Import symbol

import { SmtpTransport } from "@upyo/smtp";

Add Package

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

Import symbol

import { SmtpTransport } from "@upyo/smtp";

Add Package

vlt install jsr:@upyo/smtp

Import symbol

import { SmtpTransport } from "@upyo/smtp";

Add Package

npx jsr add @upyo/smtp

Import symbol

import { SmtpTransport } from "@upyo/smtp";

Add Package

bunx jsr add @upyo/smtp

Import symbol

import { SmtpTransport } from "@upyo/smtp";