# Set up email sending

Email is the one channel PiGi can send without setting up a provider: choose "Built-in" on the Email method and PiGi's mail service sends your customer emails from its no-reply address, with your school's email as the reply address. Connect Custom SMTP under Integrations and, on the live site, customer emails go out through your own mail server from your own address instead. Every outbound email is logged on Company → Settings → Sent emails, where you can read the error and re-queue a failed send.

Source: https://help.pigi.io/guides/company-setup/notifications/email-setup

## Quick answers

**How do I turn on email notifications?**
Company → Settings → Notifications, scroll to **Methods**, click **Set up** on the
**Email** card and choose **Built-in**. The card then shows Provider "Built-in" and an
on switch. Email is the only method that works without a third-party provider.

**Do I need my own SMTP server to send email from PiGi?**
No. Without Custom SMTP, PiGi sends through its own mail service, from PiGi's no-reply
address. Each email says it came from a no-reply address and tells the customer how to
reach your school, and replies go to your school's email.

**Can customer emails come from my school's own address?**
Yes. Connect **Custom SMTP** under Company → Settings → Integrations with your mail
server's host, username and password. On the live PiGi site, your customer emails then go
out through your server, from your **From Email**, with your **Reply-To Email** if you
set one. See [Send customer email through your own mail server](../integrations/custom-smtp.md)
and, for Google, [Use Google Workspace or Gmail with Custom SMTP](../integrations/gmail-smtp.md).

**Does the provider I pick on the Email card decide which server sends my email?**
No. What decides it is whether Custom SMTP is connected and working under Integrations.
Choosing Custom SMTP or SendGrid on the Email card does not change the route.

**What happens if my own mail server refuses an email?**
PiGi still sends it, through its own mail service from its no-reply address, with your
school's email as the reply address and a note telling the customer how to reach you.
PiGi also shows a Custom SMTP warning in the header until you fix the login and press
**Test connection**.

**Does PiGi send email through SendGrid?**
No. PiGi never sends through SendGrid, even if you connect it. Email goes through PiGi's
service, or your Custom SMTP server if you connect one.

**Can I test my Custom SMTP settings?**
Yes. On Company → Settings → Integrations → Custom SMTP, **Test connection** logs in to
your server without sending, and **Send a test email** sends one real email to the
address you type, through your server exactly as customer emails will go, and reports
**Sent** or **Not sent** with the server's reply.

**Where can I see the emails PiGi has sent?**
Company → Settings → **Sent emails**, at /school/admin/company/settings/sent-emails. It
lists every outbound email for your company with When, Status, To, Subject, Template and
Tries.

**How do I find out why an email failed?**
Company → Settings → Sent emails → click the row. The drawer shows the recipient,
template, attempts and, for failures, the full error text under a red **Error** panel.

**Can I resend a failed email?**
Yes — open the row on Company → Settings → Sent emails and press **Retry send**. Be
warned: the retry sends the template without the original details, so names, dates and
links that were personalised come out blank. For anything customer-facing, re-trigger the
original action instead.

**What do the Sent emails statuses mean?**
**queued** — accepted and waiting to be sent. **sent** — handed to the mail server.
**failed** — the send raised an error, shown on the row. There is no delivered/opened
tracking on this screen.

**Why is the preview in Sent emails not the exact email that was sent?**
PiGi stores which details an email used, not their values. The preview re-renders the
template with sample values, so it is a layout check, not a replay.

## What this is

Email is configured in up to three places. The **Methods** section of Company → Settings →
Notifications decides that email is a channel your company sends on. **Company →
Settings → Integrations → Custom SMTP** is optional and decides which server sends it.
**Company → Settings → Sent emails** is the log of everything that went out, with the
error text and a retry.

## Built-in email or your own SMTP server

Email sending works one of two ways:

- **Built-in (PiGi's mail service).** With no Custom SMTP connected, PiGi sends from its
  own no-reply address. The reply address is your school's email, and a short note at the
  bottom says the email came from a no-reply address and how to contact your school.
- **Your own SMTP server.** With Custom SMTP connected (host, username and password
  saved), customer emails on the live PiGi site go out through your server, from your
  **From Email** and with your **Reply-To Email**. Your mail provider's sending limits
  apply. If your server refuses a message, PiGi sends that one the built-in way instead
  and shows a Custom SMTP warning in the header.

PiGi's test and staging sites never use your server. SendGrid is not used for sending
either way.

## Before you start

- You need the **admin** role. The Sent emails screen is admin-only and is always scoped
  to your active company.

## Steps

1. Open **Company → Settings → Notifications** and scroll to **Methods** (or pick
   **Methods** in the page's section menu).
2. On the **Email** card, click **Set up**. (If email is already set up, click
   **Settings** on the card instead.)
3. Choose **Built-in** from the "Choose a provider…" list. The selection saves at once;
   the card shows Provider "Built-in" and an on switch.
4. Write at least one email template — see [Write notification
   templates](notification-templates.md). A method with no live template still sends
   nothing.
5. Confirm delivery by opening **Company → Settings → Sent emails** after triggering an
   event.

## Checking what was sent

Company → Settings → **Sent emails** opens on a table sorted newest-first, with a stat bar
across the top counting **All**, **Sent**, **Queued** and **Failed** — and filters for
**Status** (All / Sent / Queued / Failed) and a date range. The search box matches
recipient, subject and template name.

Clicking a row opens a drawer with **Status**, **To**, **Template**, **Sent**,
**Attempts**, the **Task ID**, any **Error**, the names of the details the email used, a
**Retry send** button and a rendered preview.

## Known limitations

- **The Email card's provider does not choose the server.** Customer emails go through
  your Custom SMTP server when it is connected and working, otherwise through PiGi's mail
  service from its no-reply address. SendGrid is never used for sending.
- **A refused email falls back quietly.** If your server refuses a message, the customer
  still gets it, but from PiGi's no-reply address. Watch for the Custom SMTP warning in
  the header.
- **Retry loses personalisation.** The resent email goes out without the original names,
  dates and links.
- **No delivery or open tracking** on the Sent emails screen — **sent** means handed to
  the mail server, not landed in an inbox.

## Related

- [Choose how notifications reach people](notification-methods.md)
- [Enable a provider integration](integrations.md)
- [Send customer email through your own mail server (Custom SMTP)](../integrations/custom-smtp.md)
- [Use Google Workspace or Gmail with Custom SMTP](../integrations/gmail-smtp.md)
- [Write notification templates](notification-templates.md)
- [Notification troubleshooting](notification-troubleshooting.md)
