Skip to main content
skill CX Codex

extension-email-raw — Claude Code skill: multi-recipient email

This skill adds sending one email to several recipients through to, cc and bcc. Handy when a meeting reminder has to reach confirmed and tentative attendees at once.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add caffeinelabs/skills --skill extension-email-raw -a claude-code
Open on GitHub

What extension-email-raw does

The skill builds on extension-email and exposes a sendRawEmail function. It takes a sender username, the to, cc and bcc lists, a subject and an HTML body, then returns SendResult: #ok on success or #err(error) with the error text. Every recipient gets the same message.

The hard limit is 50 recipients in total, and each of them sees the others in the list. That rules the skill out for service emails to many users, where exposing addresses breaks user privacy. It was never meant for that.

You need caffeineai-email at ~0.4.0 and a Caffeine AI subscription on the plus or pro tier. From 0.4.0 every send goes through the mail gateway using settings the platform injects on each deploy (INTEGRATIONS_GATEWAY_URL and INTEGRATIONS_GATEWAY_API_KEY). Without those settings a send returns #err instead of falling back. The transport canister and INTEGRATIONS_CANISTER_ID are gone, so check your config when moving off 0.3.x.

What it helps with

  • send one email to several addresses at once
  • remind meeting attendees in a single call
  • put colleagues in cc and a manager in bcc
  • surface a failed send as #err
  • re-pin a project from caffeineai-email 0.3.x to 0.4.0

Example prompts for the agent

  • Add multi-recipient email sending to the project with sendRawEmail
  • Write a function that sends a meeting reminder to confirmed attendees in to and tentative ones in cc
  • Make sure a failed send returns #err with the text and handle that case

How to install extension-email-raw

1Skills CLI (Vercel)

npx skills add caffeinelabs/skills --skill extension-email-raw -a claude-code

2Manually: put the files in place

~/.claude/skills/extension-email-raw/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/extension-email-raw/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about extension-email-raw

How do I install extension-email-raw in Claude?

Run npx skills add caffeinelabs/skills --skill extension-email-raw -a claude-code. The skill lands in ~/.claude/skills/extension-email-raw/SKILL.md.

What does extension-email-raw do?

It adds a sendRawEmail function that sends one email with multiple to, cc and bcc addresses. It returns #ok or #err(error).

How many recipients can it handle?

50 recipients in total, at most. Each recipient sees the others in the list, so the skill is not meant for service emails.

Source text

SKILL.md · Apache-2.0
---
name: extension-email-raw
description: Send an email with multiple to, cc and bcc addresses.
version: 0.2.0
compatibility:
  mops:
    caffeineai-email: "~0.4.0"
caffeineai-subscription: [plus, pro]
---

# Email — Raw Multi-Recipient
Raw multi-recipient email extension for [Caffeine AI](https://caffeine.ai?utm_source=caffeine-skill&utm_medium=referral).

## Overview

This skill adds support for sending emails with multiple `to`, `cc`, and `bcc` recipients. Not suitable for bulk service emails (recipients see each other).

# Backend

## This extension is for sending an email with support for multiple `to`, `cc` and `bcc` addresses.

- This should NOT be used for sending service emails to multiple users because each recipient will see all the other recipients listed which would typically be a breach of user privacy.

### For sending an email

- This extension depends on the [extension-email](../extension-email/SKILL.md) for sending emails.
- Use the sendRawEmail function. 
- It returns a SendResult which is #ok if the email is sent successfully otherwise #err(error) with the error text. 
- There can be a maximum of 50 recipients in total
- Each recipient receives the same email

```mo:caffeineai-email/emailClient.mo
module {
  public type SendResult = {
    #ok;
    #err : Text;
  };

  public func sendRawEmail(
    fromUsername : Text,
    to : [Text],
    cc : [Text],
    bcc : [Text],
    subject : Text,
    htmlBody : Text,
  ) : async SendResult;
};
```

### Example usage for sending an email reminder to meeting attendees.

```motoko filepath=src/backend/main.mo
import Runtime "mo:core/Runtime";
import EmailClient "mo:caffeineai-email/emailClient";

actor {
  public func sendMeetingReminder(
    meetingSubject : Text,
    meetingTime : Text,
    confirmedAttendeeEmails : [Text],
    tentativeAttendeeEmails : [Text],
  ) : async () {
    let result = await EmailClient.sendRawEmail(
      "no-reply",
      confirmedAttendeeEmails,
      tentativeAttendeeEmails,
      [],
      meetingSubject,
      "Reminder the meeting will start at " # meetingTime,
    );

    switch (result) {
      case (#ok) {};
      case (#err(error)) {
        Runtime.trap("Failed to send meeting reminder email: " # error);
      };
    };
  };
};
```

## Upgrading from the previous version

An app built with `caffeineai-email` 0.3.x re-pins with `mops add [email protected]`. `sendRawEmail` keeps its signature. Every send now goes through the mail gateway with the settings the platform injects on every deploy (`INTEGRATIONS_GATEWAY_URL` / `INTEGRATIONS_GATEWAY_API_KEY`); the transport canister and `INTEGRATIONS_CANISTER_ID` are no longer used, and a send without those settings returns `#err` instead of falling back.

An app built with `caffeineai-email` 0.2.x re-pins with `mops add [email protected]`. `sendRawEmail` keeps their signatures; every send now carries an idempotency key, so a retried outcall is sent and charged once. Apps that use verification or marketing email follow the upgrade sections of those skills.

© caffeinelabs · Apache-2.0 · caffeinelabs/skills

Similar skills

Everything for Backend and APIs →

From the same set25

extension-qr-code Adds QR code scanning through the device camera to a React app. Useful when you need to read a code right in the browser. CX Codex +1 28,200installs extension-stripe Adds Stripe card payments to a Caffeine AI project: checkout session creation and status checks. Useful when you need to take payments inside a canister. CX Codex +1 28,200installs extension-posting-to-x A skill for Caffeine builds that publish tweets to X. It sets the only supported path: the x-client package with OAuth 2.0 PKCE. CX Codex +1 28,100installs extension-openai Enforces the safe OpenAI integration pattern for Motoko canisters using openai-client. Prevents API key leaks and unnecessary billing multiplier in outcalls. CX Codex +1 28,100installs extension-invite-links Adds invite links and RSVP collection to your project. Guests submit answers using unique codes without logging in, while admins view all responses after sign-in. CX Codex +1 28,100installs extension-http-outcalls A skill for HTTP requests from a backend canister to external APIs. It keeps every request bounded on the provider side. CX Codex +1 28,100installs extension-email Enables agents to send transactional and service emails from Motoko backend canisters. Useful for notifications and order receipts. CX Codex +1 28,100installs extension-object-storage This skill adds file storage to your project: content lives off-chain while the backend keeps only references. Useful for image galleries, video and documents. CX Codex +1 28,100installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor