Hi,
I have a script that takes a backup .xml file and stores it onto the DMA. I'd like to send an email to the User that has started the script, with the config file attached. I'm having trouble getting the User's email address from the system. Below is just an example which fails as I'm just getting the UserLoginName.
How do I get the user's email address stored in DataMiner? Maybe I could use engine.SendEmail() but I wasn't clear on how to add the attachment using this and I have it working with the below.
Hi Ross, the email address based on UserLoginName, can be obtained using the following code:
var req = new GetInfoMessage { Type = InfoType.SecurityInfo };
var userInfoResponse = (GetUserInfoResponseMessage)engine.SendSLNetSingleResponseMessage(req);var dmaUser = userInfoResponse.FindUserByLoginName(engine.UserLoginName);
engine.GenerateInformation(dmaUser.EmailAdress);
Perfect, thank you very much!