Send
Send
client.emails.send(EmailSendParamsbody?, RequestOptionsoptions?): messagestringEmailSendResponse
post/v1/email
Send emails
Parameters
bodyattachmentsarraybccunionccunionfromunionheadersRecord<string, string>htmlstringreplyToListunionsubjectstringtextstringtounionEmailSendParams
Returns
EmailSendResponse
Successfully sent email
import ValTown from '@valtown/sdk';
const client = new ValTown({
bearerToken: 'My Bearer Token',
});
const response = await client.emails.send({
html: 'Hello <strong>world</strong>',
subject: 'An important message',
text: 'Hello world',
});
console.log(response.message);
200 Example
{
"message": "message"
}