Send an email
client.email.send(EmailSendParams { from, messageBody, subject, 4 more } body, RequestOptionsoptions?): EmailSendResponse { sentAt }
POST/v1/emails/send
Sends an email via the connected email account that owns the from address. Currently supports new sends only; replies and forwards are not yet supported.
Supports idempotency via the Idempotency-Key header.
Required scope: emails:create
Rate limit category: Write
Send an email
import Lightfield from 'lightfield';
const client = new Lightfield({
apiKey: 'My API Key',
});
const emailSendResponse = await client.email.send({
from: 'sales@acme.com',
messageBody: { content: '<p>Hi there,</p><p>Following up on our chat earlier this week.</p>' },
subject: 'Following up on our chat',
to: ['lead@example.com'],
});
console.log(emailSendResponse.sentAt);{
"sentAt": "sentAt"
}Returns Examples
{
"sentAt": "sentAt"
}