Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ Prefer another language or no code at all? Use the [Python](../packages/python-s

## Cloud or self-hosted

**Cloud** — [bytesend.cloud](https://bytesend.cloud) is the fastest start: sign up, verify a domain and send. No infrastructure to run.
**Cloud**: [bytesend.cloud](https://bytesend.cloud) is the fastest start: sign up, verify a domain and send. No infrastructure to run.

**Self-hosted** — ByteSend is free to self-host under AGPL-3.0. You bring PostgreSQL, Redis and an AWS account with SES.
**Self-hosted**: ByteSend is free to self-host under AGPL-3.0. You bring PostgreSQL, Redis and an AWS account with SES.

```bash
git clone https://github.com/NodeByteLTD/ByteSend.git
Expand Down
658 changes: 329 additions & 329 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions apps/docs/get-started/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ npm run send

## React Email (TypeScript)

Pass a React Email component as `react` and the SDK renders it to HTML for you — no separate render step needed.
Pass a React Email component as `react` and the SDK renders it to HTML for you, so no separate render step is needed.

```json package.json
{
Expand Down Expand Up @@ -242,7 +242,7 @@ console.log("Queued email", data.emailId);

## Next.js (App Router)

Send from a route handler, and receive [webhooks](/guides/webhooks) in another. Keep your API key on the server — never import the SDK in a client component.
Send from a route handler, and receive [webhooks](/guides/webhooks) in another. Keep your API key on the server and never import the SDK in a client component.

```ts app/api/welcome/route.ts
import { ByteSend } from "bytesend-js";
Expand Down Expand Up @@ -272,7 +272,7 @@ import { Webhooks } from "bytesend-js";
const webhooks = new Webhooks(process.env.BYTESEND_WEBHOOK_SECRET!);

export async function POST(request: Request) {
// Verify against the raw body — parsing JSON first breaks the signature.
// Verify against the raw body: parsing JSON first breaks the signature.
const rawBody = await request.text();

try {
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/get-started/go.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ fmt.Println("Contact ID:", resp.ContactID)
resp, err := client.Contacts.List(ctx, "cb_contactbook_id", bytesend.ListContactsParams{
Page: "1",
Limit: "100",
// Emails: "a@example.com,b@example.com" — filter by email addresses
// IDs: "ct_1,ct_2" — filter by contact IDs
// Emails: "a@example.com,b@example.com" : filter by email addresses
// IDs: "ct_1,ct_2" : filter by contact IDs
})
if err != nil {
log.Fatal(err)
Expand Down Expand Up @@ -317,7 +317,7 @@ if err != nil {
log.Fatal(err)
}
for _, domain := range resp {
fmt.Printf("%s — Status: %s\n", domain.Name, domain.Status)
fmt.Printf("%s (%s)\n", domain.Name, domain.Status)
}
```

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/get-started/local.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ packages/

- [Node.js](https://nodejs.org) 20 or later
- [pnpm](https://pnpm.io) 9 or later (`corepack enable` installs it automatically)
- [Docker](https://docs.docker.com/engine/install/) — used to run Postgres and Redis locally
- [Docker](https://docs.docker.com/engine/install/): used to run Postgres and Redis locally
- An [AWS](https://aws.amazon.com) account with SES access (free tier works)

## Fork and Clone the Repo
Expand Down Expand Up @@ -77,7 +77,7 @@ packages/
ln -s ../../.env apps/web/.env
```
```powershell
# Windows (PowerShell — run as administrator)
# Windows (PowerShell: run as administrator)
New-Item -ItemType SymbolicLink -Path apps\web\.env -Target ..\..\env
```
</Step>
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/guides/admin-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Give the Admin role only to people who manage billing or the team itself. Everyo

### Two-Factor Authentication

Turn on two-factor authentication in **Settings → Account** with any authenticator app. Store the recovery codes somewhere safe — they are the only way back in if you lose your device. If you sign in with GitHub, Google or Discord, enable 2FA on that provider too.
Turn on two-factor authentication in **Settings → Account** with any authenticator app. Store the recovery codes somewhere safe. They are the only way back in if you lose your device. If you sign in with GitHub, Google or Discord, enable 2FA on that provider too.

### API Key Management

Expand All @@ -216,7 +216,7 @@ Admins should:
### Activity History

ByteSend does not yet keep a team-visible audit log. To keep an eye on your account:
- Review your API keys regularly — the dashboard shows when each key was last used
- Review your API keys regularly. The dashboard shows when each key was last used
- Subscribe a [webhook](/guides/webhooks) or [notification provider](/guides/notification-providers) to email and domain events
- Check **Settings → Members** for unexpected members or pending invites

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/guides/api-authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ByteSend API uses **Bearer token authentication** for all API endpoints. You can
4. Click **Generate New API Key**
5. Give your key a name (e.g., "Development", "Production")
6. Click **Create**
7. Copy the key immediately — you won't be able to see it again
7. Copy the key immediately. You won't be able to see it again
8. Store it securely (use environment variables, not in version control)

## Using Your API Key
Expand Down
22 changes: 11 additions & 11 deletions apps/docs/guides/campaigns.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Campaigns are different from **transactional emails** (which go to a single reci
| ------- | --------- | ------------- |
| Recipients | Contact book | Individual `to` address |
| Personalization | Contact properties (`{{firstName}}`) | Custom per-request |
| Scheduling | Yes — schedule ahead | No |
| Scheduling | Yes, schedule ahead | No |
| Unsubscribe | Automatic opt-out handling | Manual |
| Use case | Marketing, newsletters | Receipts, alerts, auth codes |
| Dashboard | Campaign analytics | Email logs |
Expand All @@ -37,9 +37,9 @@ Campaigns are different from **transactional emails** (which go to a single reci
1. Go to [Campaigns](https://bytesend.cloud/campaigns)
2. Click **New Campaign**
3. Fill in:
- **Name** — internal label (not visible to recipients)
- **Subject** — email subject line
- **From address** — must use a [verified domain](https://bytesend.cloud/domains)
- **Name**: internal label (not visible to recipients)
- **Subject**: email subject line
- **From address**: must use a [verified domain](https://bytesend.cloud/domains)
- **Reply-to** (optional)
4. Design your email in the built-in editor or paste HTML
5. Select the **contact book** to send to
Expand Down Expand Up @@ -126,7 +126,7 @@ Subject: Hi {{firstName}}, here's what's new this month

```html
<p>Hey {{firstName}},</p>
<p>You're on the <strong>{{plan}}</strong> plan — here's what's new for you.</p>
<p>You're on the <strong>{{plan}}</strong> plan. Here's what's new for you.</p>
```

If a contact doesn't have a value for a variable, it renders as an empty string. See [Campaign Personalization](/guides/campaign-personalization) for advanced usage and fallback values.
Expand All @@ -148,12 +148,12 @@ ByteSend automatically handles unsubscribes:

After sending, view per-campaign metrics in the dashboard:

- **Delivered** — successfully reached the inbox
- **Opened** — recipient opened the email
- **Clicked** — recipient clicked a link
- **Bounced** — permanently undeliverable addresses
- **Complained** — marked as spam
- **Unsubscribed** — opted out via the unsubscribe link
- **Delivered**: successfully reached the inbox
- **Opened**: recipient opened the email
- **Clicked**: recipient clicked a link
- **Bounced**: permanently undeliverable addresses
- **Complained**: marked as spam
- **Unsubscribed**: opted out via the unsubscribe link

You can also pull these via the [Analytics API](/api-reference/analytics/email-time-series).

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/guides/connected-accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You need access to both addresses, the same as any other email change. If two-fa

## Verified emails only

ByteSend only accepts a provider sign-in when the provider has verified that email address. If you see *"That account's email address isn't verified with the provider"*, verify the email in your GitHub, Google or Discord settings, then try again — or sign in with your email address instead.
ByteSend only accepts a provider sign-in when the provider has verified that email address. If you see *"That account's email address isn't verified with the provider"*, verify the email in your GitHub, Google or Discord settings, then try again, or sign in with your email address instead.

<Note>
This protects your account: without it, anyone could add your email address to a new account on another service and use it to sign in to ByteSend as you.
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/guides/contact-books.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Every contact in a contact book has one of these statuses:
| ------ | ----------- |
| **Subscribed** | Active and will receive campaign emails |
| **Pending** | Added but awaiting double opt-in confirmation |
| **Unsubscribed** | Opted out — will not receive campaign emails |
| **Unsubscribed** | Opted out, won't receive campaign emails |

<Warning>
Contacts with **Pending** or **Unsubscribed** status are excluded from campaign sends. They will not receive any marketing emails from ByteSend.
Expand Down
12 changes: 6 additions & 6 deletions apps/docs/guides/deliverability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A hard bounce means the email was permanently undeliverable. The address doesn't

| Threshold | Action |
| --------- | ------ |
| Below **1.5%** | Healthy — no action |
| Below **1.5%** | Healthy, no action needed |
| **1.5% – 2%** | Warning displayed in dashboard |
| **2% or above** | Sending automatically blocked |

Expand All @@ -30,7 +30,7 @@ A complaint is recorded when a recipient marks your email as spam.

| Threshold | Action |
| --------- | ------ |
| Below **0.08%** | Healthy — no action |
| Below **0.08%** | Healthy, no action needed |
| **0.08% – 0.1%** | Warning displayed in dashboard |
| **0.1% or above** | Sending automatically blocked |

Expand Down Expand Up @@ -79,8 +79,8 @@ Remove addresses that have bounced, unsubscribed, or haven't engaged in 90+ days

ByteSend handles DKIM signing automatically when you [verify your domain](https://bytesend.cloud/domains). Make sure you also configure:

- **SPF** — Add ByteSend to your domain's allowed senders
- **DMARC** — A DMARC record tells inbox providers what to do if authentication fails. Start with `p=none` to monitor, then move to `p=quarantine` once you've confirmed alignment.
- **SPF**: Add ByteSend to your domain's allowed senders
- **DMARC**: A DMARC record tells inbox providers what to do if authentication fails. Start with `p=none` to monitor, then move to `p=quarantine` once you've confirmed alignment.

All three are shown in the domain verification flow in the dashboard.

Expand Down Expand Up @@ -203,5 +203,5 @@ If your sending is blocked due to reputation thresholds:

## Related

- [Spam Protection](/guides/spam-protection) — outbound scoring and held emails
- [Changing Sending Region](/guides/sending-regions) — move a domain to another AWS region without downtime
- [Spam Protection](/guides/spam-protection): outbound scoring and held emails
- [Changing Sending Region](/guides/sending-regions): move a domain to another AWS region without downtime
2 changes: 1 addition & 1 deletion apps/docs/guides/plan-management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ For detailed setup instructions:
- **Rotate admin roles** to prevent over-privileging
- **Review team members regularly** in your monthly management checklist
- **Use different API keys** for different integrations
- **Never share API keys** between team members — generate individual keys
- **Never share API keys** between team members. Generate individual keys

### Offboarding Team Members

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/guides/sending-regions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: globe

## Overview

Every domain sends from one AWS SES region, chosen when you add it. You can move a verified domain to another region — for example to keep data in the EU, or to sit closer to your recipients — without any downtime.
Every domain sends from one AWS SES region, chosen when you add it. You can move a verified domain to another region without any downtime, for example to keep data in the EU or to sit closer to your recipients.

Only team **Admins** can change a domain's region.

Expand All @@ -21,7 +21,7 @@ Your domain keeps sending from its current region for the whole move. ByteSend r
Open the domain in the dashboard, select **Change region** in the **Sending region** card and choose the new region.
</Step>
<Step title="Add the new DKIM record">
Add the new `TXT` record shown on the domain page. Its name includes the region (for example `bytesend-eu-west-2._domainkey`), so it sits **alongside** your existing DKIM record — don't delete the old one yet.
Add the new `TXT` record shown on the domain page. Its name includes the region (for example `bytesend-eu-west-2._domainkey`), so it sits **alongside** your existing DKIM record. Don't delete the old one yet.
</Step>
<Step title="Update your MX record">
Change the `MX` record on your `mail.` subdomain to the new region's value, for example `feedback-smtp.eu-west-2.amazonses.com`. Replace the old value; don't add a second record. Your SPF record does not change.
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/guides/spam-protection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: shield-halved

## Overview

Every email you send through the API, the SMTP relay or a campaign is scored by ByteSend's spam protection before it is queued. It protects your domain's reputation — and every other customer's — from compromised API keys, phishing and accidental spam.
Every email you send through the API, the SMTP relay or a campaign is scored by ByteSend's spam protection before it is queued. It protects your domain's reputation, and every other customer's, from compromised API keys, phishing and accidental spam.

Most mail never notices it: ordinary transactional email such as password resets, verification codes and receipts scores well below the thresholds.

Expand Down Expand Up @@ -64,5 +64,5 @@ If five of a team's messages are held within 24 hours, sending is blocked for th
- **Include real text.** An email that is a single image with no text looks like spam to every filter, not just ByteSend's.

<Tip>
Think a legitimate email was held? Contact support on [Discord](https://discord.gg/C2Q4GHXKQA) with the email ID — reviews also help ByteSend tune the rules.
Think a legitimate email was held? Contact support on [Discord](https://discord.gg/C2Q4GHXKQA) with the email ID. Reviews also help ByteSend tune the rules.
</Tip>
2 changes: 1 addition & 1 deletion apps/docs/guides/use-with-react-email.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ See the complete [React Email TypeScript example](/get-started/examples#react-em

### JavaScript

Use `.jsx` files and run them with `tsx` — it handles JSX without any Babel configuration:
Use `.jsx` files and run them with `tsx`, which handles JSX without any Babel configuration:

```sh
npx tsx send.jsx
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/self-hosting/admin-panel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Message bodies are hidden in the email explorer until you choose **View content*

Every day at 04:30 UTC, ByteSend checks each verified sending domain against the Spamhaus Domain Block List, SURBL and URIBL, and posts newly listed domains to the Discord webhook in `DISCORD_WEBHOOK_URL`. Checks are kept for 30 days.

These lists refuse queries that come through large public DNS resolvers, which most cloud servers use. ByteSend shows those results as **Unknown** rather than reporting a false "clean". For reliable Spamhaus results, set `SPAMHAUS_DQS_KEY` — see [environment variables](/self-hosting/docker#environment-variable-reference).
These lists refuse queries that come through large public DNS resolvers, which most cloud servers use. ByteSend shows those results as **Unknown** rather than reporting a false "clean". For reliable Spamhaus results, set `SPAMHAUS_DQS_KEY` (see [environment variables](/self-hosting/docker#environment-variable-reference)).

<Note>
ByteSend sends through Amazon's shared SES IP addresses, so only your sending **domains** are checked, not IPs.
Expand Down
14 changes: 7 additions & 7 deletions apps/docs/self-hosting/certificates.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ sudo certbot certonly --webroot \
-d smtp.example.com
```

### Method 3: DNS challenge (recommended — no open ports required)
### Method 3: DNS challenge (recommended: no open ports required)

The DNS challenge is the cleanest approach for an SMTP server. It requires no open HTTP port at any point — certbot proves domain ownership by adding a temporary DNS TXT record instead.
The DNS challenge is the cleanest approach for an SMTP server. It requires no open HTTP port at any point: certbot proves domain ownership by adding a temporary DNS TXT record instead.

**Manual (one-time / test):**

Expand Down Expand Up @@ -74,7 +74,7 @@ sudo certbot certonly \
-d smtp.example.com
```

Other provider plugins: `certbot-dns-route53`, `certbot-dns-digitalocean`, `certbot-dns-google`, etc. — see the [certbot documentation](https://certbot.eff.org/docs/using.html#dns-plugins) for a full list.
Other provider plugins: `certbot-dns-route53`, `certbot-dns-digitalocean`, `certbot-dns-google`, etc. See the [certbot documentation](https://certbot.eff.org/docs/using.html#dns-plugins) for a full list.

<Tip>Use a scoped API token with only **Zone → DNS → Edit** permissions for the target zone. Never use a global API key.</Tip>

Expand Down Expand Up @@ -112,7 +112,7 @@ EOF
sudo chmod +x /etc/letsencrypt/renewal-hooks/post/bytesend-smtp.sh
```

The ByteSend SMTP Server watches certificate files for changes and reloads TLS automatically — no restart required.
The ByteSend SMTP Server watches certificate files for changes and reloads TLS automatically, so no restart is required.

---

Expand All @@ -136,8 +136,8 @@ openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes \
```

This produces:
- `fullchain.pem` — self-signed certificate
- `privkey.pem` — private key
- `fullchain.pem`: self-signed certificate
- `privkey.pem`: private key

Configure the server:

Expand Down Expand Up @@ -247,7 +247,7 @@ The process running the server must be able to read both files. Private keys are
**Systemd service (runs as `smtp` user):**

```bash
# Grant read access using ACLs (recommended — preserves existing permissions)
# Grant read access using ACLs (recommended: preserves existing permissions)
sudo setfacl -R -m u:smtp:rx /etc/letsencrypt/live/smtp.example.com/
sudo setfacl -R -m u:smtp:rx /etc/letsencrypt/archive/smtp.example.com/

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/self-hosting/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This guide covers the fastest path to a running ByteSend instance using Docker C
- [Docker Engine](https://docs.docker.com/engine/install/) 24+
- [Docker Compose](https://docs.docker.com/compose/) v2 (included with Docker Desktop)
- A domain name pointing to your server (for production)
- AWS credentials with SES access — see [Create AWS Credentials](/get-started/create-aws-credentials)
- AWS credentials with SES access: see [Create AWS Credentials](/get-started/create-aws-credentials)

---

Expand Down
6 changes: 3 additions & 3 deletions apps/docs/self-hosting/firewall.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ sudo ufw allow 22/tcp
Open the ports your clients need. At minimum allow 587; add the others as required:

```bash
# Port 25 — MTA / inter-server (often blocked by cloud providers)
# Port 25: MTA / inter-server (often blocked by cloud providers)
sudo ufw allow 25/tcp

# Port 465 — Implicit TLS (SMTPS)
# Port 465: Implicit TLS (SMTPS)
sudo ufw allow 465/tcp

# Port 587 — Submission with STARTTLS (most common)
# Port 587: Submission with STARTTLS (most common)
sudo ufw allow 587/tcp

# Alternate ports used by ByteSend SMTP (optional)
Expand Down
Loading
Loading