# Base44

> Add email sending with MailBlastr to a Base44 app using backend functions and a stored API key.

[Base44](https://base44.com) is a platform for building apps with AI. You can add MailBlastr to a Base44 project by asking the chat to add email sending with MailBlastr.

> **Note:** This integration requires **backend functions**, available on the Builder tier and above, because the API key must be used server-side.

## 1. Wire up email in Base44

**If adding to an existing app**, enable backend functions, then ask the chat:

```text
Add MailBlastr email sending to my app. Prompt me to provide the API key, store
it server-side as MAILBLASTR_API_KEY, and send a welcome email to new users by
POSTing to https://api.mailblastr.com/emails with an Authorization: Bearer header.
```

In Node.js backend functions you can install the official `mailblastr` SDK (`npm install mailblastr`) and call `mb.emails.send(...)`. In other runtimes the backend function calls the MailBlastr Emails API over plain HTTP.

## 2. Add your MailBlastr API key

However you add email to your project, create a MailBlastr API key in the [dashboard](https://www.mailblastr.com/docs/api-keys/overview) and store it as a backend secret named `MAILBLASTR_API_KEY`.

> **Warning:** Do not share your API key or expose it in client-side code. Keep it in a backend function secret.

## 3. Add a custom domain

By default you can only send email to your own address. To send to other recipients, [add and verify a custom domain](https://www.mailblastr.com/docs/add-a-domain), then update the `from` field in the backend function to use an address on that domain (or ask the chat to update it).
