After a team is successfully registered in Supabase, Carnero.Dev dispatches a confirmation email via the Resend API. The email is sent fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/moradoadrian/carneroDev/llms.txt
Use this file to discover all available pages before exploring further.
registro@carnero-dev.tech and includes the team’s full registration details rendered inside a styled HTML template. Email dispatch is a best-effort operation — a failure does not roll back the database record and the POST /api/register endpoint still returns 200 with email_sent: false.
Email Configuration
| Property | Value |
|---|---|
| From | Carnero.Dev <registro@carnero-dev.tech> |
| To | Team representative’s email (repEmail) |
| Subject | Tu registro para Carnero.Dev fue confirmado |
| Formats | HTML (primary) + plain text fallback |
Sending an Email
Once the Supabase insert succeeds, the handler resolves theRESEND_API_KEY from Astro’s import.meta.env with a process.env fallback. A new Resend instance is created per request, and resend.emails.send() is called with both the html and text fields. The return value is destructured to check mailResult.error; a non-null error is logged and reflected in the response body without aborting the 200 return.
Email Content
The HTML template is a table-based layout optimized for Gmail, Outlook, Yahoo Mail, and mobile screens. It is composed of three main sections:-
Header — Burgundy banner (
#4a0e17) with the<Carnero.Dev/>logo in monospace type and the “Build The Future” tagline in gold (#d9a441), separated from the body by a gold bottom border. -
Body — Personalized greeting addressing the representative by name, followed by a monospace data table with a left gold border containing five rows:
EQUIPO— team nameREPRESENTANTE— representative’s full nameCORREO— representative’s email addressINTEGRANTES— member countCATEGORÍA— fixed value: Build The Future
https://carnero-dev.tech. -
Footer — Dark panel (
#050508) with the automated-message disclaimer and the sender attribution: “ITR Roque • Departamento de TICs”.
Plain Text Fallback
Atext field is always included alongside html to improve deliverability and pass spam filters that penalize HTML-only messages. The plain text template mirrors the essential data from the HTML version:
Error Handling
Email dispatch has three distinct failure modes, all of which are handled without interrupting the successful registration response: 1. Missing or placeholderRESEND_API_KEY
If import.meta.env.RESEND_API_KEY (and the process.env fallback) is either undefined or equals the literal string re_your_resend_api_key_placeholder, the server logs a warning and skips the entire Resend block:
200 response body will contain email_sent: false and email_error: "Servicio de correo temporalmente desconectado.".
2. Resend API returns an error
If resend.emails.send() resolves successfully but mailResult.error is non-null, the server logs the error object:
email_sent: false and email_error set to mailResult.error.message.
3. Network or runtime exception
If resend.emails.send() throws (network timeout, DNS failure, unexpected runtime error), the catch block logs the exception:
email_error in the response. The registration remains saved in Supabase.