Send emails with Resend
Send transactional emails (receipts, confirmations) from your app’s own code with Resend. Your app’s code cannot connect to a mail server directly (SMTP): it goes through Resend’s HTTPS API. To send through your own provider without any code, use Manage › Emails instead.
1. Before you start
Create a Resend account. Sending email runs in a server function, which requires a paid plan.
Important: your app’s code can only reach the internet over HTTPS; a direct SMTP connection (ports 25/465/587) is blocked. That is why the code uses Resend’s HTTPS API. The SMTP settings you enter in Manage › Emails are a different thing: Makasi uses them itself to send your app’s emails.
2. Where to find your key
- Open API Keys and create one.
- Copy it (starts with re_) and paste it in the key panel as a secret name (no VITE_), e.g. RESEND_API_KEY.
3. Verify your sending domain
To send from your own address (not a test one), verify your domain: Resend gives you DNS records (SPF, DKIM) to add where your domain is managed.
Until the domain shows “Verified”, real emails may land in spam or be rejected. See the email-domain guide for the DNS details.
4. Test to production
You can send to your own address while testing. Before publishing, verify your domain and confirm the key is a production key — the platform reminds you to check your keys at publish time.
5. Common problems
Emails never arrive: the domain is not verified, or you are sending from an unverified address.
Timeouts with no error: the code tries a direct SMTP connection — switch to the HTTPS API.
403/unauthorized: the API key is wrong, revoked, or from a different Resend account.