ReplyToMailMessage
Reply to a mail message.
Stored Procedure Specific Information
Reply to an email by using this procedure.
Example on how to include attachments:
By using JSON aggregates
{
"Attachments": [{"fileName": "filename", "data": "base64Encoded attachment content"}]
}
EXECUTE ReplyToMailMessage @To = 'email', @From = 'sender_email', @CC = 'email', @BCC = 'email', @Content = 'content', @Attachments = "json aggregate"
By using temporary tables:
INSERT INTO Attachments#TEMP (FileName, Data) VALUES ('MyFile.txt', "base64Encoded data")
INSERT INTO Attachments#TEMP (FileName, Data) VALUES ('C:\\MyDirectory\\MyFile.extensio', "")
EXECUTE ReplyToMailMessage @To = 'email', @From = 'sender_email', @CC = 'email', @BCC = 'email', @Content = 'content', @Attachments = "Attachments#TEMP"
Input
| Name | Type | Required | Description |
| MessageId | String | True | The id of the message to reply to. Can be retrieved from the Messages table. |
| From | String | False | The email address of the sender. |
| To | String | True | The email address(es) of the recipient(s). |
| CC | String | False | CCed recipient(s). |
| BCC | String | False | BCCed recipient(s). |
| Content | String | False | The message body. |
| Attachments | String | False | The attachment content. Either the name of the temp table or the json aggregate. |
Result Set Columns
| Name | Type | Description |
| Id | String | The Id for the message as returned by the server. |