It's all about the answers!

Ask a question

How can I create an email from a DNG widget?


Ronald Wisniewski (132) | asked Jul 12 '17, 3:15 p.m.

 I am creating a widget that will be modifying an artifact, and then based on certain attributes an email may need to be sent to users affected by the modification.  I know that base JavaScript cannot send emails, but on the API page under ShowUserPicker (https://jazz.net/wiki/bin/view/Main/RMExtensionsAPI602#ShowUserPicker) the example code states "// Create a registry of the names and emails of a set of selected users for use in sending out notifications to the group."

So based on this there must be a way to send emails.  How?  Can someone tell me what lines would follow in the below example to create an email for the chosen users?
registerUserGroup = function() {
    RM.Client.showUserPicker(function(pickResult) {
        pickResult.data.forEach(function(userRef) {
            RM.Data.getUserDetails(userRef, function(user) {
                userRegistry[user.email] = user.username;
            });
        });
    });
};
    

Be the first one to answer this question!


Register or to post your answer.