Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Is any API or customization available to retrieve PLM user email address?


Is any API or customization available to retrieve PLM user email address?

I am using Windchill PDMLink Release 11.2 and Datecode with CPS

Is any API or customization available to retrieve the PLM user email address to be used to send email notifications?
Email is to be used in customization provided in Article - CS63309.

Or any way to retrieve "DefaultNotificationSenderEmail".

Accepted Solutions

Do you just need the address? Try this:


View solution in original post


Do you just need the address? Try this:


Thank you @avillanueva for the quick reply.

As I am using Article - CS63309 to send email notifications, but am not able to receive any emails.

Does it require any configuration before using the customization provided in the article?

This is a snippet I use to create my own workflow task notification email. I know that general email notifications might vary slightly but they all use a template. Does this help? Aside from receiving emails, you can check that the queue is actually creating the notification. If you stop the queue, you can see if it indeed is being queued up to send an email.  If you restart the queue, the task will disappear after its processed and the email should be on its way. Unless there is something outside of the system that is not delivering it. Sry for simple question but have you verified that other emails are being send from system properly and just not these custom ones?

WTDistributionList distroList = new WTDistributionList();
        Persistable p = null;
        if ((workItem.getPrimaryBusinessObject() != null) && (workItem.getPrimaryBusinessObject().toString() != null))
          p = workItem.getPrimaryBusinessObject().getObject();
        if (AccessControlHelper.manager.hasAccess(user.getPrincipal(), p, AccessPermission.READ)) {
          LOGGER.debug("adding " + user.getDisplayName() + " to distribution.");
        TemplateEmailNotification email = new TemplateEmailNotification(distroList);
        Object[] arrayOfObject = new Object[5];
        arrayOfObject[0] = activity.getName();
        //PDML-10 - Improved email templates showed call out of template processor was incorrect.
        WfTaskNotificationProcessor processor = new WfTaskNotificationProcessor(workItem);
        //processor.setState(new TemplateProcessorState());
        String str = "";
        try {
        catch (IOException e) {}
        WTPrincipal localWTPrincipal = activity.getParentProcess().getCreator().getPrincipal();
        if (localWTPrincipal instanceof WTUser) {
          try {
            str = new InternetAddress(((WTUser)localWTPrincipal).getEMail()).getAddress();
          catch (NullPointerException nullE) {}
          catch (Exception e)
              LOGGER.debug("Exception while creating IntenetAddress==>");
          LOGGER.debug("Sender:" + str);
        LOGGER.debug("Created email, returning.");
        return email;


Thank you @avillanueva for the suggestion.

Basically, I need to configure the SMTP configuration first.