Skip to Content
🎉 New release with new features and improvements! V0.0.4 Release →

Mailing Service

The Mailing Service provides methods for sending emails using plain text, HTML content, or email templates.

Methods

send

Sends an email using either plain text, HTML content, or email templates.

Simple plain text email.

await bshEngine.mailing.send({ payload: { to: 'recipient@example.com', subject: 'Test Email', body: 'This is a test email body', html: false } });
PropertyTypeRequiredDescription
tostringyesRecipient email address
subjectstringnoEmail subject line
bodystringno*Email body content
htmlbooleannoWhether body contains HTML (default: false)
templatestringno*Template name for template-based emails. See Email Templates
dataobjectnoTemplate variables for dynamic content

*Either body OR template must be provided.