Email (SMTP) Setup
Configure email sending for team invitations using any SMTP provider.
When is email used?
CubeAdmin uses email for two purposes:
- Team invitations — when a superadmin invites a new team member, an invitation email is sent with a sign-up link
- Magic link sign-in — an optional passwordless login method
The app starts and runs without email configured. Invitations will fail gracefully with a logged error if SMTP is not set up.
Gmail
Requires a Google account with 2FA enabled, and an App Password (not your regular password). Create one at Google Account → Security → App Passwords.
SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_SECURE=false SMTP_USER=you@gmail.com SMTP_PASS=your-16-char-app-password EMAIL_FROM=CubeAdmin <you@gmail.com>
Mailgun
SMTP_HOST=smtp.mailgun.org SMTP_PORT=587 SMTP_SECURE=false SMTP_USER=postmaster@mg.yourdomain.com SMTP_PASS=your-mailgun-smtp-password EMAIL_FROM=CubeAdmin <noreply@yourdomain.com>
Amazon SES
Use the SMTP credentials from the SES console (not your AWS IAM credentials).
SMTP_HOST=email-smtp.us-east-1.amazonaws.com SMTP_PORT=587 SMTP_SECURE=false SMTP_USER=your-ses-smtp-access-key-id SMTP_PASS=your-ses-smtp-secret EMAIL_FROM=CubeAdmin <noreply@yourdomain.com>
Brevo (formerly Sendinblue)
SMTP_HOST=smtp-relay.brevo.com SMTP_PORT=587 SMTP_SECURE=false SMTP_USER=your@email.com SMTP_PASS=your-brevo-smtp-key EMAIL_FROM=CubeAdmin <noreply@yourdomain.com>
Local dev with Mailpit
Mailpit is a local mail catcher — it accepts all emails without sending them and shows them in a web UI. Perfect for development.
# Start Mailpit
docker run -p 1025:1025 -p 8025:8025 axllent/mailpit
# .env.local SMTP_HOST=localhost SMTP_PORT=1025 SMTP_SECURE=false # No SMTP_USER or SMTP_PASS needed
View captured emails at http://localhost:8025.
Configuration email (SMTP)
Configurez l'envoi d'emails pour les invitations d'équipe avec n'importe quel fournisseur SMTP.
Quand l'email est-il utilisé ?
CubeAdmin utilise l'email dans deux cas :
- Invitations d'équipe — quand un superadmin invite un nouveau membre, un email d'invitation est envoyé avec un lien d'inscription
- Connexion par lien magique — une méthode de connexion sans mot de passe optionnelle
L'application démarre et fonctionne sans email configuré. Les invitations échoueront silencieusement avec une erreur dans les logs si SMTP n'est pas configuré.
Gmail
Nécessite un compte Google avec la 2FA activée et un Mot de passe d'application (pas votre mot de passe habituel). Créez-en un dans Compte Google → Sécurité → Mots de passe d'application.
SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_SECURE=false SMTP_USER=vous@gmail.com SMTP_PASS=votre-mot-de-passe-app-16-chars EMAIL_FROM=CubeAdmin <vous@gmail.com>
Mailgun
SMTP_HOST=smtp.mailgun.org SMTP_PORT=587 SMTP_SECURE=false SMTP_USER=postmaster@mg.votredomaine.com SMTP_PASS=votre-mot-de-passe-smtp-mailgun EMAIL_FROM=CubeAdmin <noreply@votredomaine.com>
Amazon SES
Utilisez les identifiants SMTP de la console SES (pas vos identifiants AWS IAM).
SMTP_HOST=email-smtp.eu-west-1.amazonaws.com SMTP_PORT=587 SMTP_SECURE=false SMTP_USER=votre-ses-smtp-access-key-id SMTP_PASS=votre-ses-smtp-secret EMAIL_FROM=CubeAdmin <noreply@votredomaine.com>
Brevo (ex-Sendinblue)
SMTP_HOST=smtp-relay.brevo.com SMTP_PORT=587 SMTP_SECURE=false SMTP_USER=votre@email.com SMTP_PASS=votre-clé-smtp-brevo EMAIL_FROM=CubeAdmin <noreply@votredomaine.com>
Développement local avec Mailpit
Mailpit capture tous les emails sans les envoyer et les affiche dans une interface web. Idéal pour le développement.
# Démarrer Mailpit
docker run -p 1025:1025 -p 8025:8025 axllent/mailpit
# .env.local SMTP_HOST=localhost SMTP_PORT=1025 SMTP_SECURE=false # Pas de SMTP_USER ni SMTP_PASS nécessaires
Consultez les emails capturés sur http://localhost:8025.