Skip to Content
🎉 New release with new features and improvements! V0.0.6 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', fromName: 'BSH Engine', 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
fromNamestringnoFrom display name; falls back to provider fromName

*Either body OR template must be provided.