mcpField
E
extension-email-raw

extension-email-raw

github.com/caffeinelabsProductivity228.6k installsUpdated 6d ago
Repository

About extension-email-raw

A Caffeine AI skill for sending one email to multiple to, cc, and bcc recipients. It supports up to 50 recipients, who all receive the same message and can see listed recipients.

Key features

  1. 01Send to, cc, and bcc recipients
  2. 02Support up to 50 recipients in total
  3. 03Send the same message to every recipient

Use cases

  1. 01Send meeting reminders to attendees
  2. 02Email a group when recipient visibility is acceptable

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/caffeinelabs/skills --skill extension-email-raw

After installing, type/extension-email-rawin Claude Code to confirm it loaded.

Details

From the project README

Email — Raw Multi-Recipient

Raw multi-recipient email extension for Caffeine AI.

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 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
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.
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.

Comments

Markdown supported