I am able to send an email to a single email address with the following script:
var to = "my.name@email.com"
engine.SendEmail(
new EmailOptions
{
TO = to,
CC = cc,
Title = subject,
Message = body,
SendAsPlainText = false,
}
);
However I keep getting an error when trying to use the syntax "user:domainname\username" or "group:domainname\groupname".
Is there a specific format for Cube users/groups in the TO/CC/BCC fields of EmailOptions? Or is there another way to do this in automation scripts?
Thanks!
Hi Nick,
A few months ago, we discovered that, in some cases, an error could be thrown when trying to send emails via automation script directly to a user or a user group (e.g. by sending a simple email without any reports/dashboards attached).
This flow has been fixed since DataMiner versions 10.3.0 [CU13], 10.4.0 [CU1] (Main release) and 10.4.4 (Feature release), see Release Notes: General Main Release 10.3.0 CU13 | DataMiner Docs.
If the user accounts have an e-mail address configured for them (as Wouter asked in his comment), it's possible that your system is running an older DataMiner version which doesn't contain the fix yet.
Hope this helps!
Looks like that was it, we actually just updated to 10.4.0 last night and it’s working now!
Hi Nick,
The syntax “USER:xxxx” / “GROUP:xxxx” does seem correct.
Is there a specific type of error message received?
I assume that the user accounts you’re referring to do have an e-mail address configured for them?