MobileCRM.Platform.emailWithAttachments - Resconet/JSBridge GitHub Wiki

[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).

Arguments

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("[email protected]", /// email address
	"Test Subject", /// email subject
	"Hi, This is Resco email.", /// email body
	attachments, null, null, endTest, null);
}