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.
Overview
This guide walks you through how to send a transactional email using the Nuntly TypeScript SDK.
Send a HTML email
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
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
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} 🎉`);