Send Email
Send an email using either plain text, HTML content, or email templates.
First you need to configure the email configurations before using this endpoint.
Endpoint
POST /api/mailing/sendRequest Body
Here’s the code in markdown format:
Direct
Send a simple plain text or HTML email directly.
{
"to": "recipient@example.com",
"cc": ["colleague@example.com"],
"bcc": ["archive@example.com"],
"subject": "Test Email",
"body": "This is a test email body",
"fromName": "BSH Engine",
"html": false // or true for HTML
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string/array | Yes | Recipient email address(es) |
cc | string/array | No | Carbon copy recipient email address(es) |
bcc | string/array | No | Blind carbon copy recipient email address(es) |
subject | string | No | Email subject line |
body | string | No* | Email body content |
html | boolean | No | Whether body contains HTML (default: false) |
template | string | No* | Template name for template-based emails |
data | object | No | Template variables for dynamic content |
fromName | string | No | Human-readable From display name (e.g. BSH Engine → BSH Engine <support@example.com>) |
* Either body or template is required, but not both.
Sender display name
Recipients see the SMTP From address from your mail provider configuration. When a display name is resolved, the message is sent as Display Name <address> instead of the bare address.
Resolution order:
fromNamein this request — used when non-blank.fromNamein the active mail provider config — otherwise.
Set a global default via environment mailing secrets (fromName) or the provider From Name field in the admin panel.