cbmailservices

Sends transactional and notification emails from ColdBox/BloxLang applications via configurable protocols and templates.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill cbmailservices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cbmailservices
Source: https://github.com/ColdBox/skills/tree/main/modules/cbmailservices
Command: npx skills add https://github.com/ColdBox/skills --skill cbmailservices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables ColdBox and BoxLang applications to send transactional and notification emails without manual SMTP handling, simplifying templating, attachments, protocol selection, and safe testing workflows.

Core Features & Use Cases

  • Protocol Flexibility: Configure and switch between SMTP, Postmark, SendGrid, Mailgun, or a NullProtocol for tests via module settings and environment variables.
  • Fluent Mail Builder: Construct emails with recipients, CC/BCC, reply-to, subjects with token substitution, HTML/text bodies, and attachments using a chainable API.
  • Templating & Tokens: Render ColdBox view templates for HTML bodies and replace tokens for personalized content; suitable for transactional emails like welcome messages and invoices.
  • Async & Testing: Queue emails for background delivery to avoid blocking request threads and use the NullProtocol to avoid sending real mail in test suites.
  • Production Best Practices: Encourages environment-driven credentials, protocol switching per environment, result logging, and recipient validation.

Quick Start

Send a templated HTML welcome email to a new user using the mailService fluent builder with an environment-configured protocol.

Frequently Asked Questions about cbmailservices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send transactional email from a ColdBox application?

Send transactional email from ColdBox using a fluent mail builder API that supports configurable protocols, HTML templates, attachments, and token replacement for personalized content delivery.

Can I switch between SMTP and SendGrid protocols in ColdBox without changing code?

Yes, you can switch between SMTP, SendGrid, Postmark, and Mailgun protocols at runtime using environment variables and module settings, allowing seamless environment-driven credential management.

How do I test email sending in ColdBox without delivering real messages?

Use the NullProtocol in your test suites to prevent sending real mail while still validating email construction, recipient validation, and result-based error logging behaviors.

What is the best way to queue emails for background delivery in ColdBox?

Queue emails for async background delivery to avoid blocking request threads, utilizing the fluent builder API to construct messages with CC, BCC, and attachments before processing.

Does ColdBox support rendering HTML email templates with personalized tokens?

Yes, ColdBox renders view templates for HTML email bodies and performs token replacement to inject personalized content, making it suitable for transactional messages like welcome emails.

How do I add attachments and manage CC/BCC recipients when sending email in BoxLang?

Construct emails with attachments, CC, BCC, and reply-to addresses using the chainable fluent mail builder API, ensuring complete message configuration before sending through your configured protocol.