send_mail
Send transactional emails and marketing communications using SendGrid's API. Configure recipients, content, and delivery settings to manage email campaigns and automated messaging.
Instructions
Send an email using SendGrid Mail Send API
Input Schema
Name | Required | Description | Default |
---|---|---|---|
content | Yes | Email content | |
from | Yes | ||
personalizations | Yes | Personalization settings for recipients | |
reply_to | No | ||
subject | No | Default subject if not set in personalizations |
Input Schema (JSON Schema)
{
"properties": {
"content": {
"description": "Email content",
"items": {
"additionalProperties": false,
"properties": {
"type": {
"description": "Content type (text/plain, text/html)",
"type": "string"
},
"value": {
"description": "Content body",
"type": "string"
}
},
"required": [
"type",
"value"
],
"type": "object"
},
"type": "array"
},
"from": {
"$ref": "#/properties/personalizations/items/properties/to/items"
},
"personalizations": {
"description": "Personalization settings for recipients",
"items": {
"additionalProperties": false,
"properties": {
"bcc": {
"items": {
"$ref": "#/properties/personalizations/items/properties/to/items"
},
"type": "array"
},
"cc": {
"items": {
"$ref": "#/properties/personalizations/items/properties/to/items"
},
"type": "array"
},
"subject": {
"type": "string"
},
"substitutions": {
"additionalProperties": {},
"type": "object"
},
"to": {
"items": {
"additionalProperties": false,
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"email"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"to"
],
"type": "object"
},
"type": "array"
},
"reply_to": {
"$ref": "#/properties/personalizations/items/properties/to/items"
},
"subject": {
"description": "Default subject if not set in personalizations",
"type": "string"
}
},
"required": [
"personalizations",
"from",
"content"
],
"type": "object"
}