> ## Documentation Index
> Fetch the complete documentation index at: https://nuntly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Your First Email

> Learn how to send your first transactional email using the Nuntly API. Includes examples for HTML, plain text, and combined email messages.

<Note>
  Before continuing, make sure you've completed the [SDK setup and requirements](/docs/guides/requirements).
</Note>

## Overview

This guide walks you through how to send a **transactional email** using the Nuntly TypeScript SDK.

## Send a HTML email

```typescript theme={null}
const { data, error } = await nuntly.emails.send({
  from: 'ray@info.tomlinson.ai',
  subject: 'Verify Your Email Address',
  to: 'brian67@gmail.com',
  html: `
    <h1>Welcome 🎉</h1>
    <p>Thank you for signing up! Please verify your email address..</p>`,
});

if (error) {
  return console.error('Error sending email:', error);
}
console.log(`Email sent ${data.id} 🎉`);
```

## Send a Text email

```typescript theme={null}
const { data, error } = await nuntly.emails.send({
  from: 'ray@info.tomlinson.ai',
  subject: 'Verify Your Email Address',
  to: 'brian67@gmail.com',
  text: 'Thank you for signing up! Please verify your email address.',
});

if (error) {
  return console.error('Error sending email:', error);
}
console.log(`Email sent ${data.id} 🎉`);
```

## Send both HTML and Text

```typescript theme={null}
const { data, error } = await nuntly.emails.send({
  from: 'ray@info.tomlinson.ai',
  subject: 'Verify Your Email Address',
  to: 'brian67@gmail.com',
  html: `
    <h1>Welcome 🎉</h1>
    <p>Thank you for signing up! Please verify your email address...</p>
  `,
  text: 'Thank you for signing up! Please verify your email address...',
});

if (error) {
  return console.error('Error sending email:', error);
}
console.log(`Email sent ${data.id} 🎉`);
```
