Features
- Send emails to any recipient with a custom subject and message.
- Attach files as
BloborFileobjects. - Authorization token support for secure API calls.
Function Overview
ThesendEmailAsync function sends an email using a POST request to the email service endpoint. It supports the following parameters:
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient’s email address. |
subject | string | Yes | Subject of the email. |
message | string | Yes | Body of the email. |
from | string | No | Sender’s email address. Defaults to the configured sender address. |
attachments | Array of objects | No | List of attachments to include in the email. |
attachments array should have the following properties:
| Property | Type | Required | Description |
|---|---|---|---|
filename | string | Yes | The name of the file to be attached. |
file | Blob or File | Yes | The binary content of the file. |
Usage Example
1. Sending an Email Without Attachments
2. Sending an Email with Attachments using Blob file
3. Sending an Email with Attachments using Binary Content
Documentation for Sending Emails with Base64 Attachments (backend, hooks)
This guide explains how to use thesendEmail function to send emails with PDF attachments in base64 format.