SendMail
Creates and sends a new email message to one or more specified recipients. This procedure constructs a new message object, defines its content, and dispatches it via the Exchange server.
Stored Procedure Specific Information
You can send a mail with attachments, specifying one or more file paths or the base 64 content of the attachment. To specify file paths use Attachments input, whereas for base 64 encoded content specify AttachmentContent and AttachmentName.
Note that if the file location specified in the 'Attachments' input is a folder, than all the files of the first level in that folder will be sent as attachments.
EXECUTE SendMail Subject = 'Issue with CData ADO.NET Provider for Microsoft Exchange', Content = 'I am not being able to connect to Microsoft Exchange', Attachments = 'C:\Users\User\Desktop\logfile.txt,C:\Users\User\Desktop\TestConnectionLog.txt', ToRecipients = '[email protected]'
You can include CC and BCC recipients and send the mail. To specify one or more recipients, separate them using ','.
EXECUTE SendMail Subject = 'Issue with CData ADO.NET Provider for Microsoft Exchange', Content = 'I am am not being able to connect to Microsoft Exchange', ToRecipients = '[email protected]', CcRecipients = '[email protected], [email protected], [email protected]', BccRecipients = '[email protected]'
Input
| Name | Type | Required | Description |
| Subject | String | True | The subject line of the email message. This is displayed to recipients as the email's title in their inbox. |
| Content | String | True | The main body of the email message. This can include plain text or HTML-formatted content depending on client support. |
| Attachments | String | False | A comma-separated list of file paths to local files that should be attached to the email (for example, 'C:\Documents\file1.pdf' or 'C:\Images\image1.png'). |
| AttachmentContent | String | False | The binary content of the attachment, encoded as a Base64 string. This is used when including the attachment directly in the request rather than referencing file paths. |
| AttachmentName | String | False | The filename to assign to the attachment created from 'AttachmentContent'. This will be the name displayed to recipients in the email client. |
| ToRecipients | String | True | A comma-separated list of primary recipients for the email. Each value must be a valid email address (for example, '[email protected]' or '[email protected]'). |
| CcRecipients | String | False | A comma-separated list of email addresses to be copied on the message (Cc:). Recipients in this field are visible to all other recipients. |
| BccRecipients | String | False | A comma-separated list of email addresses to be blind-copied on the message (Bcc:). Recipients in this field are hidden from other recipients. |
Result Set Columns
| Name | Type | Description |
| Success | String | Indicates whether or not the operation was successful. |