microsoft-email-service
v1.0.2
Published
Helper Module To Send Email Using Microsoft Graph Api With Validations
Downloads
5
Readme
API Documentation
Overview
This API allows you to send emails by providing some details in the request body and authenticating with an API key.
Endpoints
POST /live/send-email
- Description: Simply sends an email with the specified details.
Authentication
All requests must include an API key in the headers for authentication.
Headers
| Key | Value | Description |
|-----------|---------------------|----------------------------|
| X-API-Key | your-api-key-here
| API key for authentication |
Request Body
| Key | Type | Description | |--------------------------|--------|-----------------------------------------------------------| | from | string | The sender's email address (required) (club l address) | | recipients | object | Object containing recipient lists | | recipients.toRecipients | array | List of recipient email addresses (at least one required) | | recipients.bccRecipients | array | List of BCC recipient email addresses (optional) | | recipients.ccRecipients | array | List of CC recipient email addresses (optional) | | content | string | Object containing email content | | content.subject | string | The subject of the email (max 125 characters, required) | | content.bodyContent | string | The content of the email (required) | | content.bodyContentType | string | The content type of the email (HTML or Text, required) | | attachments | array | List of attachments (optional) See below table |
'attachments' Object:
| Key | Type | Description | |--------------|--------|---------------------------------------------------------| | contentName | string | The name of the attached file (required) | | contentType | string | The MIME type of the attachment (required) | | contentBytes | string | The base64-encoded content of the attachment (required) |