import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const response = await client.emails.send({ from: 'from', subject: 'subject', to: 'string' });
console.log(response.id);{
"id": "<string>",
"message_id": "<string>",
"scheduled_at": "<string>",
"status": "sent",
"timezone": "<string>"
}Send an email immediately or schedule it for later using the scheduled_at parameter. Supports HTML/text content, attachments, and custom headers.
import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const response = await client.emails.send({ from: 'from', subject: 'subject', to: 'string' });
console.log(response.id);{
"id": "<string>",
"message_id": "<string>",
"scheduled_at": "<string>",
"status": "sent",
"timezone": "<string>"
}Your Inbound API key. Include it in the Authorization header as: Bearer
Sender email address
Recipient email address(es)
Email subject
HTML content of the email
Plain text content of the email
Custom email headers
Show child attributes
Show child attributes
ISO 8601 date or natural language for scheduling
Timezone for natural language parsing
Was this page helpful?