npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

taoya7-server-emails

v1.0.0

Published

基于 React Email 的现代化邮件模板库,支持多种邮件发送场景,可自定义主题色

Downloads

84

Readme

📧 Better Auth Emails

一个基于 React Email 的现代化邮件模板库,专门为认证和通知场景设计。提供了丰富的邮件模板和组件,支持多种邮件发送场景。

✨ 特性

  • 🎨 现代化设计 - 基于统一的设计系统,确保视觉一致性
  • 📱 响应式布局 - 完美适配各种设备和邮件客户端
  • 🧩 组件化架构 - 可复用的组件,易于定制和扩展
  • 🎯 多种模板 - 涵盖常见的邮件发送场景
  • 🔧 TypeScript + Zod - 完整的类型定义和运行时验证
  • 🚀 开箱即用 - 提供默认数据,可直接预览效果
  • 📦 多种传输方式 - 支持 Resend、SMTP、开发模式

📬 邮件模板

提供以下开箱即用的邮件模板:

  • 🔑 Magic Link - 魔法链接登录
  • 🔐 Email OTP - 邮箱验证码
  • 🔄 Reset Password - 重置密码
  • 👋 Welcome - 欢迎新用户
  • 🔔 Login Notify - 登录通知
  • 🔧 API Key Created - API密钥创建通知
  • 📦 Order Confirmation - 订单确认
  • 📢 Notification - 通用通知

📦 安装

pnpm add @taoya7/server-emails

🚀 快速开始

基础使用

import { EmailClient } from '@taoya7/server-emails'

// 创建邮件客户端
const client = new EmailClient({
  transport: {
    type: 'resend',
    apiKey: process.env.RESEND_API_KEY
  },
  imagesBaseUrl: 'https://yourdomain.com',
  from: '[email protected]',
  replyTo: '[email protected]',
  emailConfig: {
    appName: '你的应用名称',
    company: {
      name: '你的公司',
      website: 'https://yourdomain.com',
      supportEmail: '[email protected]'
    }
  }
})

### 传输方式配置

#### 1. Resend

```typescript
const client = new EmailClient({
  transport: {
    type: 'resend',
    apiKey: 'your-resend-api-key'
  },
  // ... 其他配置
})

2. SMTP

const client = new EmailClient({
  transport: {
    type: 'smtp',
    host: 'smtp.gmail.com',
    port: 587,
    secure: false,
    auth: {
      user: '[email protected]',
      pass: 'your-password'
    }
  },
  // ... 其他配置
})

3. 开发模式(不实际发送)

const client = new EmailClient({
  transport: { type: undefined }, // 或者不传 transport
  // ... 其他配置
})

📮 联系方式