Skip to content

Email

Send transactional emails from your app. Manage sender identities and track delivery from Dashboard > Emails or the SDK.

Every Proyecta app can send transactional email. Verify a sender identity, then send from your app code — no SendGrid, Resend, or Mailgun account required.

Open Dashboard > Emails in the builder. The tab has two sub-tabs:

TabWhat it’s for
IdentitiesAdd and verify sender email addresses or domains
SentBrowse sent emails with delivery status (sent, delivered, bounced, etc.)

You can add a new sender identity, resend verification emails, re-check DNS records for domain verification, and browse your email delivery history — all without writing code.

  1. Create and verify a sender identity (an email address or a domain)
  2. Call proyecta.email.send() with the verified address in the from field

The simplest path is to verify a single email address — Proyecta sends a confirmation link that the owner clicks.

import Proyecta from '@proyecta-ai/sdk';
const proyecta = new Proyecta({ apiKey: process.env.PROYECTA_API_KEY });
const identity = await proyecta.email.identities.create({
type: 'email',
value: 'hello@myapp.com',
});
// identity.status === 'pending' until the recipient clicks the link

If the verification email doesn’t arrive or the user misses it, resend it:

await proyecta.email.identities.verify(identity.id, { resend: true });

For production apps, verify the entire domain so you can send from any address at it (hello@, support@, noreply@, etc.).

const identity = await proyecta.email.identities.create({
type: 'domain',
value: 'myapp.com',
mail_from_enabled: true, // enable a custom MAIL FROM for SPF alignment
mail_from_subdomain: 'mail', // defaults to 'mail'
});
// identity.verification_records contains the DNS records you need to add
for (const record of identity.verification_records ?? []) {
console.log(record.type, record.name, record.value);
}

Add the returned TXT, CNAME, and (if mail_from_enabled) MX records to your domain’s DNS. Then trigger a recheck:

await proyecta.email.identities.verify(identity.id, {});
// identity.status === 'verified' when all records resolve

Once your identity is verified, send with:

await proyecta.email.send({
from: 'Acme <hello@myapp.com>',
to: 'customer@example.com',
subject: 'Your receipt from Acme',
html: '<p>Thanks for your order — here are the details.</p>',
text: 'Thanks for your order — here are the details.',
});

send returns the sent email’s ID, which you can use to look up delivery status later.

Recipients. to, cc, and bcc all accept a single address or an array. Maximum 50 recipients per send.

Content. Provide html, text, or both. For best deliverability, include a plain-text version.

Attachments. Pass base64-encoded file contents. Total attachment size must not exceed 40 MB after encoding.

Reply-to, custom headers, metadata tags. All supported — see EmailSendParams.

List sent emails (paginated) with their latest delivery event:

const { data: emails } = await proyecta.email.list({ limit: 20 });
for (const email of emails) {
console.log(email.subject, '', email.last_event);
// last_event: 'sent' | 'delivered' | 'opened' | 'clicked' | 'bounced' | 'complained'
}

Fetch a single email with its full HTML/text body:

const full = await proyecta.email.get('email_abc123');
console.log(full.html, full.text, full.last_event);

You don’t need to write this by hand:

  • "Verify hello@myapp.com as a sending identity and email me the verification link."
  • "Send a welcome email with Proyecta Email whenever a new user signs up. Use a nice HTML template."
  • "After a successful checkout, send the customer a receipt using proyecta.email.send."
  • "Show me the last 20 emails we've sent and whether they bounced."
  • The from address must be a verified identity. Sending with an unverified address returns an error.
  • Monthly limits apply based on your Proyecta plan.
  • DNS changes take time to propagate. Domain verification can take anywhere from a few minutes to a few hours depending on your DNS provider’s TTL.
  • Template editor — design transactional templates visually in the builder
  • Bulk/batch send endpoint for mass mailings