Skip to main content
Home
This release is 4 versions behind 0.4.0 — the latest version of @upyo/core. Jump to latest

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

Works with
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 Score100%
Downloads374/wk
Published2 months ago (0.3.1)

Simple email sending library for Node.js, Deno, Bun, and edge functions

interface Message

Represents an email message with various properties such as sender, recipients, subject, content, and attachments.

You wouldn't typically create this type directly. Instead, you probably want to use the createMessage function, which provides a more convenient API for creating messages.

Properties

readonly
sender: Address

The email address of the sender of the message.

readonly
recipients: readonly Address[]

The email addresses of the recipient of the message.

readonly
ccRecipients: readonly Address[]

The email addresses of the carbon copy (CC) recipients of the message.

readonly
bccRecipients: readonly Address[]

The email addresses of the blind carbon copy (BCC) recipients of the message.

readonly
replyRecipients: readonly Address[]

The email addresses of the reply-to recipients of the message.

readonly
attachments: readonly Attachment[]

The attachments included in the email message. These are files that are sent along with the email, such as documents, images, or other media files. Each attachment is represented by an Attachment object, which contains information about the attachment such as its filename, content type, and content ID.

readonly
subject: string

The subject of the email message. This is typically a brief summary of the content of the email, and is used to help the recipient identify the purpose of the message.

The content of the email message, which can be either HTML or plain text. This property is represented by the MessageContent type, which includes both HTML and plain text content. The HTML content is typically used for rich formatting and layout, while the plain text content is used for simple text emails or for compatibility with email clients that do not support HTML.

The priority of the email message, which indicates its importance relative to other messages. The priority can be one of three levels: "high", "normal", or "low". This is represented by the Priority type, which is a string literal type that allows only these three values.

readonly
tags: readonly string[]

The tags associated with the email message.

The headers of the email message. This is represented by the ImmutableHeaders type, which is a supertype of the standard Headers class. The ImmutableHeaders type includes only the methods for reading the headers, such as get, keys, has, and entries, but does not include methods for modifying the headers, such as append, delete, or set.

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/core

Import symbol

import { type Message } from "@upyo/core";
or

Import directly with a jsr specifier

import { type Message } from "jsr:@upyo/core";

Add Package

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

Import symbol

import { type Message } from "@upyo/core";

Add Package

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

Import symbol

import { type Message } from "@upyo/core";

Add Package

vlt install jsr:@upyo/core

Import symbol

import { type Message } from "@upyo/core";

Add Package

npx jsr add @upyo/core

Import symbol

import { type Message } from "@upyo/core";

Add Package

bunx jsr add @upyo/core

Import symbol

import { type Message } from "@upyo/core";