The Mail service allows you to send emails though brainCloud using the mail service provider you have configured on the Manage Integrations page of the brainCloud portal.
Advanced Parameters
Using the SendAdvancedEmail method you can specify service-specific parameters to use when sending an email. Things like tags, categories, templates, and substitutions. The available parameters will depend on the mail service provider you have enabled.
SendGrid
Example of dynamic templated SendGrid email parameters:
{
"fromAddress": "email@company.com",
"fromName": "Jane Doe",
"replyToAddress": "optional@company.com",
"replyToName": "Optional ReplyTo",
"cc": ["xxx@company.com"],
"bcc": ["yyy@company.com"],
"templateId": "d-www-xxx-yyy-zzz",
"dynamicData": {
"user": {
"firstName": "John",
"lastName": "Doe"
},
"resetLink": "www.dummuyLink.io"
},
"categories": ["category1", "category2"],
"attachments": [
{
"content": "VGhpcyBhdHRhY2htZW50IHRleHQ=",
"filename": "attachment.txt"
}
]
}
Mail template formats sent into SendGrid.
Information on setting up SendGrid can be found here.
General Template Parameters
Parameter | Description |
---|---|
fromAddress | An alternate from address. |
fromName | An alternate from name. |
replyToAddress | An alternate reply-to address. |
replyToName | An alternate reply-to name. |
cc | Array of email addresses to cc. |
bcc | Array of email addresses to bcc. |
templateId | The templateId of the SendGrid template to use for this message. |
categories | Additional category tags for this email. |
attachments | File attachments. |
Dyanmic Template Parameters
Parameter | Description |
---|---|
dynamicData | Dynamic email data. |
HTML/plain-text Template Parameters
Parameter | Description |
---|---|
useHtml | Should display email contents in html. |
subject | The email subject |
body | The email body |
Legacy Template Parameters
Parameter | Description |
---|---|
substitutions | Substitutions to use in the specified template. Only valid if template is used. |
API Summary
Send Mail
- SendBasicEmail - simplified send an email to a profile id.
- SendAdvancedEmail - send an email with to a profile id.
- SendAdvancedEmailByAddress - send an email to an email address.
- SendAdvancedEmailByAddresses - send an advanced email to the address specified.
📄️ SendAdvancedEmail
Sends an advanced email to the specified user.
📄️ SendAdvancedEmailByAddress
Sends an advanced email to the specified email address.
📄️ SendAdvancedEmailByAddresses
Sends an advanced email to the address specified.
📄️ SendBasicEmail
Sends a simple text email to the specified user.