Skip to content

Sending email: sender, transport and a test message

Describes PhoenixKit 3.6.1. On an older release? The version menu above has this guide as it was then.

PhoenixKit sends email of its own: account confirmations, password resets, magic sign-in links, sign-in alerts, invitations, the welcome email and notifications. The Emails Transactional page decides who that mail comes from, how it looks, and which service delivers it, and lets you send a test.

Where to find it

Settings → Emails Transactional (/admin/settings/email-sending). You need the Settings permission, or the Owner or Admin role. Each part of the page is a tab: Sender Identity, Branding, Transport, Default Integration and Test Send, plus Local Dev Mailbox on a development set-up. Installed modules can add tabs of their own.

Newsletter sending is set up separately, on Emails Bulk (see the guide on send profiles). The optional Emails module has its own Emails settings page; this one is core’s.

Settings, Emails Transactional, Sender Identity in PhoenixKit: the effective sender, a warning that noreply@localhost cannot be logged, and the from name and email fields Settings, Emails Transactional, Sender Identity in PhoenixKit: the effective sender, a warning that noreply@localhost cannot be logged, and the from name and email fields

The sender of the site's own emails.

Sender Identity

The subtitle shows the sender in use right now: Currently effective: a name and address.

  • From name and From email: the sender of every email PhoenixKit sends. Leave a field blank to fall back to the application config or the built-in default.
  • Save sender identity keeps them.

If the address is not a full address (name@domain.tld), a warning says This sender address cannot be logged: the mail is still delivered, but the email tracking module writes nothing to its log.

Branding

Branding sets how emails look:

  • Accent colour: the colour of buttons and links in every email, and of the accent bar of the standard layout. Type it as #RRGGBB or use the colour picker; a sample Button shows the result. Leave it blank for neutral buttons and links and no accent bar. Save accent colour keeps it.
  • Logo: the logo shown in the header of every email. It is the site’s logo from Settings → General (Change the logo, site name or site URL in Settings → General). With none, the header shows the site name. A logo stored in a private library is never used.

Preview emails opens a preview of every email the site sends (see the guide on email previews).

Welcome email

Send a welcome email after an address is confirmed turns the welcome email on or off. It is sent once to each user after they confirm their own email address: by the confirmation link, a magic link, a sign-in with a provider that verified the address, or by correcting an address they had not confirmed yet. It is not sent when an administrator confirms an account. Preview shows it.

Transport

Transport says what delivers the mail when no default integration is chosen:

  • Static mailer: built-in PhoenixKit mailer, or the application’s own mailer, marked Configured or Not configured, with its adapter.
  • Email-capable integrations: the connections that can send mail (SMTP, Amazon SES, Brevo API), with their Service, Name and Status (Connected, Not tested, Not connected, Error or Not configured). With none yet: No email-capable integrations connected yet. and Add one.

If the static mailer has no adapter, the page says so: set one in the application config, or connect an integration and pick it as the default.

Default Integration

Default Transactional Integration chooses the connection that all of core’s mail (authentication, notifications) goes through. Choose None — use the static mailer to use the transport above. The choice is saved as soon as you pick it.

Test Send

Type a Recipient and press Send test email. A plain-text message with the subject “Test email from” and your site name is sent through whatever is in effect. The page says Test email sent to …, or why it could not be sent, for example a field the integration is missing.

Local Dev Mailbox

This tab appears while the mailer uses Swoosh’s local adapter (a development set-up). There, Deliver development mail to /dev/mailbox collects outgoing mail in a mailbox page at /dev/mailbox. With it off, outgoing mail is written to the server log. The page warns that the mailbox has no sign-in, so anyone who can reach the server can read the single-use links in it: use it only on closed environments.

What it doesn’t do

  • It does not send newsletters or campaigns: those use send profiles on Emails Bulk.
  • It does not keep a log of sent mail; that is the separate Emails module.
  • Email texts are not edited here: a developer overrides them with files (see the guide on email previews).
  • While the site requires email confirmation, an account that has not confirmed its address gets only the mail its holder asks for: the confirmation, a password reset or a sign-in link. Notification and digest emails and the sign-in and passkey alerts are not sent to it.

For developers

Without a default integration, mail goes through the static mailer: PhoenixKit’s built-in mailer, or your app’s own mailer named in config :phoenix_kit, :mailer, with its Swoosh adapter set in your app’s config.