Skip to content

feat(integrations): add html, text and attachments to SendEmail - #370

Open
egidijusj wants to merge 2 commits into
mainfrom
feat/sendemail-html-text-attachments
Open

egidijusj wants to merge 2 commits into
mainfrom
feat/sendemail-html-text-attachments

Conversation

@egidijusj

Copy link
Copy Markdown
Collaborator

Summary

Brings SendEmailParams in line with what Core.SendEmail accepts. The current docs only list to, subject, body and from_name, and they describe body as plain text, but it has always been sent as HTML.

  • html: the same slot as body under an explicit name. Set one or the other.
  • text: a plain-text part. It works alone, or alongside body/html to send both versions in one email.
  • attachments: up to 5 files, either a file the app uploaded (file_url) or base64 content. Exported as EmailAttachment.
  • body is now optional. Existing callers still compile.
  • The SendEmail() docs now say who you can email, and have two examples.

Types and docs only. The integrations proxy already posts whatever object it gets, so these fields already reach the backend.

This replaces #266 (opened from a fork) and ports it to packages/sdk. Changes from #266:

  • SendEmailParams stays a plain interface. With feat(types): add html and text fields to SendEmailParams #266's RequireAtLeastOne<…> alias, TypeDoc drops the whole property list from the SendEmail() section of the Mintlify page. The "at least one of body, html or text" rule is in the parameter description instead.
  • No version bump. Releases bump the version separately.

Template fields (template_id, template_name, variables, category) stay out while email templates are in preview.

Test plan

  • npm test -w @base44/sdk: type tests and 437 unit tests pass
  • npm run lint
  • npm run create-docs: the SendEmail() section lists every field, including the nested attachments properties, and both examples render

🤖 Generated with Claude Code

SendEmailParams only described to/subject/body/from_name, and called body
plain text when it has always been sent as HTML. The backend also accepts
html (the same slot as body), text (a plain-text part, alone or alongside
the HTML) and attachments, so body is now optional.

SendEmailParams stays a plain interface: an "at least one of" mapped type
makes TypeDoc drop the whole property list from the Mintlify page.

Template fields (template_id, template_name, variables, category) stay out
while email templates are in preview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.59-pr.370.a3fc0ae

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.59-pr.370.a3fc0ae"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.59-pr.370.a3fc0ae"
  }
}

Preview published to npm registry — try new features instantly!

@github-actions github-actions Bot added the docs-draft PR has auto-drafted documentation suggestions label Nov 5, 2026
…chment

Inside a field, the docs pipeline drops {@link} and code formatting,
so link UploadFile() and UploadPrivateFile() to their sections with
markdown anchors. Rephrase "Supported extensions:" so it isn't a
colon used as a sentence break.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-draft PR has auto-drafted documentation suggestions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants