What works without it#
Accounts are created by an administrator, who hands over the first password in person; a person who forgets
theirs asks an administrator, who gives them a new one from Administration → People (the key icon: the
old sessions close, 2FA is removed, the new password shows once). Until email is set up, the Forgot your
password? page explains exactly that instead of promising a link. Whoever holds root has
studio-recover admin for the administrators themselves.
Turning it on#
Studio's settings live in one file, /opt/studio/shared/.env, shared by every release so an update
never touches it. It is owned by the studio user and readable by nobody else; root edits it over
SSH. Studio does not read the file on each request but a cache built from it, so a change is live only after a
reload, and studio-recover does both in one go:
studio-recover env # opens the .env in $EDITOR (nano), reloads on save
studio-recover reload # after editing the file with anything elseThe file already carries the block to fill in. Set MAIL_MAILER to smtp, uncomment the
host, port, scheme and credentials, and keep a sender address at your domain (most providers want the domain
verified on their side first):
MAIL_MAILER=smtp
MAIL_FROM_ADDRESS=studio@agency.test
MAIL_FROM_NAME="Studio"
MAIL_HOST=smtp.resend.com
MAIL_PORT=587
MAIL_SCHEME=smtp
MAIL_USERNAME=resend
MAIL_PASSWORD=re_xxxxxxxxxxxxxxxxxxxxxxxxMAIL_SCHEME is smtp for a STARTTLS port (587, 2525) and smtps for an
implicit-TLS port (465). Where to find the values with the usual providers:
| Provider | Host · port | Username | Password |
|---|---|---|---|
| Resend | smtp.resend.com · 587 or 465 | resend | an API key |
| Postmark | smtp.postmarkapp.com · 587 | the server token | the same server token |
| SendGrid | smtp.sendgrid.net · 587 | apikey | an API key |
| Mailgun | smtp.mailgun.org · 587 (smtp.eu.mailgun.org in the EU) | postmaster@<your domain> | the SMTP password of that domain |
| Amazon SES | email-smtp.<region>.amazonaws.com · 587 | SMTP credentials made in the SES console (not the IAM access key itself) | |
| Brevo | smtp-relay.brevo.com · 587 | the account login | an SMTP key |
| Google Workspace | smtp.gmail.com · 587 | the mailbox | an app password (2-step verification on) |
| Your own server | its host · 587 or 465 | a mailbox allowed to relay | |
Studio ships with the SMTP transport alone: a provider's HTTP API (Resend's, Postmark's, SES's) needs a package
the release does not carry, and every one of them offers SMTP, so there is nothing to install. Any other line of
the file is Studio's own business; the ones you may want are the MAIL_* block and, for a different
interface language, APP_LOCALE (en or it).
Checking it#
Log out, open Forgot your password?: once email is configured the form is there. Send yourself a link;
it should arrive within a minute. If it does not, the reason is in /opt/studio/shared/storage/logs/
(the newest laravel-*.log): a refused login, a blocked port, a sender the provider does not know.
Fix the line, studio-recover reload, try again. To go back to not sending, MAIL_MAILER=log
and a reload.