-
Notifications
You must be signed in to change notification settings - Fork 24
MobileCRM.Platform.emailWithAttachments
rescocrm edited this page May 15, 2023
·
9 revisions
[v9.1] Sends a list of files (full paths or IReferences to blobs) as email attachments.
This method either open the CRM Email form or the native mail client (depending on application settings).
| Argument | Type | Description |
|---|---|---|
| address | String | Recipient"s email address. |
| subject | String | An e-mail subject. |
| body | String | A string with email body. |
| attachments | Array | Array of files to send. Element must be a full path or a IReference to a note, etc. |
| entity | MobileCRM.Reference | The related entity reference. |
| relationship | MobileCRM.Relationship | The relationship to the created email entity. (optional). |
| errorCallback | function(errorMsg) | The errorCallback which is called asynchronously in case of error. |
| scope | Object | The scope for errorCallback. |
This example demonstrates how to call native email client or MobileCRM HTML emails with attachments.
function sendEmail(filePath) {
var attachments = []; /// Array attachments to send. Element must be a full path or a reference to a note.
attachments.push(filePath);
MobileCRM.Platform.emailWithAttachments("someone@example.com", /// email address
"Test Subject", /// email subject
"Hi, This is Resco email.", /// email body
attachments, null, null, endTest, null);
}