Hi, I am trying to create a script that attaches an M-Files generated document to an email notification. Normal email scripts don't seem to work with our servers, so I was wondering if it is possible to download a document from M-Files and attach it to a notifications via a workflow state script with VBScript? I have attached the the piece of code that I would like to use to send the email notification (and attachment) below.
Thanks
Option Explicit
' User or user group recipients from the vault
Dim oUsers : Set oUsers = CreateObject("MFilesAPI.UserOrUserGroupIDs")
Dim oUser : Set oUser = CreateObject("MFilesAPI.UserOrUserGroupID")
oUser.UserOrGroupID = 1 ' User ID 32
oUser.UserOrGroupType = MFUserOrUserGroupType.MFUserOrUserGroupTypeUserAccount
oUsers.Add -1, oUser
' External recipients
Dim oExternalUsers : Set oExternalUsers = CreateObject("MFilesAPI.Strings")
oExternalUsers.Add -1, "khoendib@documentwarehouse.com.na"
Vault.NotificationOperations.SendCustomNotification oUsers, False, oExternalUsers, True, "Test email", "Test email body"
