Sending mail via API to Vault ADMS Server or Enterprise AddOdd (VAO)

Sending mail via API to Vault ADMS Server or Enterprise AddOdd (VAO)

kdaTZK4A
Enthusiast Enthusiast
863 Views
1 Reply
Message 1 of 2

Sending mail via API to Vault ADMS Server or Enterprise AddOdd (VAO)

kdaTZK4A
Enthusiast
Enthusiast

Hi,

Has anyone experience in sending email from VAULT API?

I am making a Custom Job for the Vault Job Procceser and want to send out an email on certain conditions.

In the docs for VAO i can see that I can send email notifications on Lifecycle transitions.

I would like to do it via API when certain condotions are true and be able to make a custom body in the email being send.

My ADMS has SMTP configured and is configured to send out notification. Is tested and works.

 

I found this:

using VDF = Autodesk.DataManagement.Client.Framework;

 

public JobOutcome Execute(IJobProcessorServices context, IJob job)
{
  string[] attacments = null;
  byte[][] fileContents = null;

  context.Connection.WebServiceManager.PackageService.SendEmail("sender-email", "receiver-email", "From Costum   Job", "News", attacments, fileContents);

}

 

Get this exception:

StackTrace = " at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)\r\n
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)\r\n
at Autodesk.Connectivity.WebServices.IPackageServ...

0 Likes
864 Views
1 Reply
Reply (1)
Message 2 of 2

frank_willing
Contributor
Contributor

Hi,

 the declaraition of

string[] attacments = null;
byte[][] fileContents = null;

is wrong.

here my declarations (sorry but in vb.net):


' KORREKT: Ein leeres Array von Strings
Dim attachmentPaths() As String = New String() {}

' KORREKT: Ein leeres Array von Byte-Arrays
Dim attachmentContents()() As Byte = New Byte()() {}

 

after the change it worked.

also you changed sender and receiver.

 

regards Frank

0 Likes