AgentSkillsCN

email

在“枯燥的 JavaScript 技术栈”中,运用邮件发送模式——Sails.js 邮件钩子配置、EJS 模板、SMTP/Resend 传输,以及事务性邮件模式。在 Sails.js 应用程序中配置邮件、编写邮件模板,或发送事务性邮件时,可使用此技能。

SKILL.md
--- frontmatter
name: email
description: >
  Email sending patterns for The Boring JavaScript Stack — sails-hook-mail configuration, EJS templates,
  SMTP/Resend transports, and transactional email patterns. Use this skill when configuring mail, writing
  email templates, or sending transactional emails in a Sails.js application.
metadata:
  author: sailscastshq
  version: '1.0.0'
  tags: email, mail, smtp, resend, templates, ejs, transactional, boring-stack

Email

The Boring JavaScript Stack uses sails-hook-mail for email delivery. It provides a simple API for sending emails through configurable transports (SMTP, Resend, log) with EJS-based templates and a shared layout system.

When to Use

Use this skill when:

  • Configuring sails-hook-mail in config/mail.js (transports, from address, mailers)
  • Writing EJS email templates in views/emails/
  • Using the shared email layout (views/layouts/layout-email.ejs)
  • Sending emails via sails.helpers.mail.send.with()
  • Setting up SMTP providers (Mailgun, SendGrid, AWS SES) or Resend
  • Implementing transactional email patterns (verification, password reset, magic links, 2FA codes)
  • Switching between log transport (development) and real transports (production)

Rules

Read individual rule files for detailed explanations and code examples: