Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Get role member email address View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
yoek - 3/28/2013 5:11:11 AM
   
Get role member email address
Hi Guys,

Currently, I'm having problem with macro to get the members email address of of a role.
Could you please give me some clue how to get them please?

User image

Cheers

User avatar
Kentico Support
Kentico Support
kentico_filipl - 3/28/2013 8:56:59 AM
   
RE:Get role member email address
Hi,

I can see that you are trying to set notification e-mail settings of Workflow steps to members of some role. If that is the case, then you can set it directly in Site Manager -> Administration -> Permissions for Module -> Content and check Manage workflow for the selected role. This will ensure that e-mails regarding content changes of documents under workflow are sent to all members of the role.

Best regards,
Filip Ligac

User avatar
Certified Developer v7
Certified  Developer v7
yoek - 3/28/2013 8:20:01 PM
   
RE:Get role member email address
Hi Filip

Indeed, this will send an email to particular role in part of workflow. But this send email event is part of time out step. Let say in this case, if the the document is not actioned after 2 days, and it will send an email to particular role with custom email template. Thats is the purpose of this step, hopefully this will give another clue.

Cheers

User avatar
Kentico Support
Kentico Support
kentico_filipl - 3/29/2013 4:44:33 AM
   
RE:Get role member email address
Hi,

Regrettably, there is no such macro. If you need to achieve this functionality through macros, you have to create a custom macro - details are in Developer's Guide - Registering custom macro methods.

However, a more flexible solution would be to use event handler for this workflow step where you can specify the action which should be performed whenever this event occurs -> Developer's Guide - Global events. To send an e-mail, you can use Kentico CMS API method
CMS.EmailEngine.EmailSender.SendMassEmail(EmailMessage message,	string userNames, string roleNames, string groupNames, int siteId)
To see further details, you can take a look at API Reference.

Best regards,
Filip Ligac