Sending emails to groups

Hi all,
I have to send emails to participants inside a group on the server. The groups are synced with the AD on the server.. Now do I need to include a code to call all groups under the ROLE for which I am sending emails to or the following code is fine even though the participants are not directly assigned but are inside the groups which are extracted from the AD?
Role role;
Mail mail = Mail();
role = activity.role.find(name : activity.role.name);
String email = null;
String subject = "Test Email";
String message = "test";
for(int i=0; i < role.participants.length(); i++)
email = role.participants.email;
logMessage("---" +email);
if(email != null)
mail.contentType = "text/html";
mail.subject = subject;
mail.from = ADMIN_EMAIL;
mail.recipient = email;
mail.message = message;
mail.send();
else
logMessage("Problem!! email value for this user [" + role.participants[i].name + "] is null. Please contact the administrator.");

Well the participants belong to a particular group in the AD and that group is assigned to a role . So if you are trying to access participants in that role, it should automatically try to access participants inside the group in the AD to which the ROLE is assigned to?
If there are participants inside a group in the AD which is synced to ALBPM, should ALBPM auto-detect those participants inside that group and if that group is assigned to a ROLE, should ALBPM auto-detect those participants inside that GROUP and send them emails?
Am I right?
Also what is id : departmentName over here?
Do we need to exactly specify the group name in the AD?
My question is :-
Why do we need to hard-code an AD group name into our code because if we say :-
activity.role.find(name : activity.role.name);
it should find the role for that activity and all participants belonging to that role should be emailed.
Now if these participants are under a group which is assigned to the ROLE, then all participants under that role need to be emailed..
Doesn't ALBPM automatically detect this?
Edited by: user8752903 on Sep 21, 2010 8:49 AM
Edited by: user8752903 on Sep 21, 2010 8:57 AM
Edited by: user8752903 on Sep 21, 2010 9:11 AM

Similar Messages

  • No longer sending emails to Groups

    Help, All of a sudden I can no longer send emails to groups. It says the server is not accepting the email.

    Well the participants belong to a particular group in the AD and that group is assigned to a role . So if you are trying to access participants in that role, it should automatically try to access participants inside the group in the AD to which the ROLE is assigned to?
    If there are participants inside a group in the AD which is synced to ALBPM, should ALBPM auto-detect those participants inside that group and if that group is assigned to a ROLE, should ALBPM auto-detect those participants inside that GROUP and send them emails?
    Am I right?
    Also what is id : departmentName over here?
    Do we need to exactly specify the group name in the AD?
    My question is :-
    Why do we need to hard-code an AD group name into our code because if we say :-
    activity.role.find(name : activity.role.name);
    it should find the role for that activity and all participants belonging to that role should be emailed.
    Now if these participants are under a group which is assigned to the ROLE, then all participants under that role need to be emailed..
    Doesn't ALBPM automatically detect this?
    Edited by: user8752903 on Sep 21, 2010 8:49 AM
    Edited by: user8752903 on Sep 21, 2010 8:57 AM
    Edited by: user8752903 on Sep 21, 2010 9:11 AM

  • Sending email to groups from iPad/iPhone

    How do you send email to groups from an iPad or iPhone ?

    Do all the contacts in the group have a valid email address? What does the server complain about exactly (without revealing the actual email addresses)?

  • 'Send email to group' is not working

    I have just made a group in address book. As far as I can tell, I have made it in exactly the same way as all my other groups. However, when I right click on the group name, and choose 'send email to group', it opens a window with nothing in the To: field. I've tried restarting the app, restarting the computer, and even creating the group again, but still it doesn't work.
    All other groups made before this still work fine: when I choose 'send email to group' the To: field is filled with recipients's addresses.
    This is a real problem for me as I use this feature all the time. I'd appreciate any help.

    Seems to be working now. I don't know what was wrong before.

  • Send emails to groups using iPhone

    There are few third-party apps that lets you send emails to groups. One such app is called Mail2Group. It lets you create groups and individual email address of your contacts (ex: if there is work and home address, you can pick which one). You can also add address outside of your contacts. Can be very handy when you are sending email frequently and to groups of people. Search for "mail2Group" on app store..

    Just found the answer on previous posting - go to composing and untick show group members addresses. In case this helps anyone else who is struggling with this.

  • Group addresses not added when sending email - only group name

    Just helping a friend use Thunderbird on a new PC with Win 7 Prof. Previously he used Outlook Express under Win XP.
    Downloaded latest version of Thunderbird. Imported old wab file as suggested using "morefunctionsfor..." . The old (complete) address book was imported correctly into a new address book in Thunderbird. It contained several groups. Each of these is correctly listed underneath the new address book and they also appear in the new address book. Clicking on any group correctly shows the list of addresses for that group.
    However, if one selects a group and sends an email to that group ONLY the name of the group appears in the TO field and the email fails to send. Closer inspection of the contents of the address field show that only the group name and NOT the constituent addresses are being included.
    Thanks

    My problem is that groups are no longer recognised and cannot be used to send emails. Does Mozilla respond to this problem or do we have to wait for a clever user to find the solution? The problem for me is fundamental and will shortly affect whether I have to find an alternative program.

  • Sharepoint Designer 2013 cannot send email to group

    Have a nice day, all!
    I have got a trouble with Sharepoint designer 2013 - I can not send email from workflow to Sharepoint group users. It's the same trouble that describe
    here Please, look at the pictures there.
    http://sharepoint.stackexchange.com/questions/67688/sharpoint-designer-2013-stopping-when-workflow-people-group-selection
    Thank you!

    Hi
    when you create the workflow select 2010 workflow
    Kind Regards,
    John Naguib
    Technical Consultant/Architect
    MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation
    Please remember to mark your question as answered if this solves your problem

  • When I first began using the Razr I could send email to groups that I had set up in my Google account.  I can no longer get this function to work.

    I can do this function on the PC using my Google Gmail account which accesses my personal email account. << Personal information removed to comply with Verizon Wireless Terms of Service >> I had been able at first to forward email go groups on my Droid Razr when away from my PC.
    Message was edited by: Verizon Moderator

    Have you by chance Cleared the Cache it might not hurt to Clear it and see if that Helps..

  • Could not send email to group in my iMac Cloud

    due to: they kept saying found 1 or more invalid addresses.  I could not understand why does it happened.  All my contacts have corrected addresses, when I send one each email and it sent alright but not in group.

    If you don't like the new ways that iPhoto handles emailing then you can access the old way with a small change in how you work:
    1. Drag the pics from the iPhoto Window to the Mail icon in the Dock.
    or
    2. Use the Photo browser in Mail - or any Media browser in the entire OS
    Uploaded with plasq's Skitch!
    You can then resize the image in the iPhoto Window
    Uploaded with plasq's Skitch!
    Finally, you can make a simple OS Service to to automate the procedure. For more on this have a read of this:
    http://discussions.apple.com/thread.jspa?threadID=2627690&tstart=0
    Regards
    TD

  • Send email to group in iPhoto '11-how to

    Hi-I have a group set up in my Address Book to send new photos of my grandson to selected people. Before I upgraded, I just typed in the name of the group and that was that. With this update though, it doesn't auto fill the people in the group. Am I missing something or is this a bug? I know there are other ways I can send the announcement but I do like the new format for sending within iPhoto. Thanks for any help! Judy

    If you don't like the new ways that iPhoto handles emailing then you can access the old way with a small change in how you work:
    1. Drag the pics from the iPhoto Window to the Mail icon in the Dock.
    or
    2. Use the Photo browser in Mail - or any Media browser in the entire OS
    Uploaded with plasq's Skitch!
    You can then resize the image in the iPhoto Window
    Uploaded with plasq's Skitch!
    Finally, you can make a simple OS Service to to automate the procedure. For more on this have a read of this:
    http://discussions.apple.com/thread.jspa?threadID=2627690&tstart=0
    Regards
    TD

  • Send Email to group not working

    Using MOSS 2007 SP1, I am creating a SPD workflow and one of the actions is a Email action.
    If I have it send the e-mail to my email address, it works.
    I created an Active Directory security group and put myself in the group.
    If I have it send the email to the Active Directory group, which appears in the lookup list for the To: field, I do not get the e-mail.  There are no errors in the logs.
    I created a Sharepoint Group and put myself in the group.
    if I have it send the email to the Sharepoint Group, which appears in the lookup list for the To: field, I do not get the e-mail.  There are no errors in the logs.
    Why wouldn't the e-mails to the groups work?  Both of those methods should work, shouldn't they?

     
    Hello,
               If you are integrating your MOSS with Exchange server 2007 to send out-going email then please try the following steps to fix your problem:
    1.       Go to Exchange Management Console -> Recipient Configuration -> Distribution group.
    2.       Right-click on the problem group and choose properties.
    3.       On the Mail Flow Settings tab, double click on Message Delivery Restrictions.
    4.       Uncheck the check box "Require that all senders are authenticated".
             Have a try and see the effect.
             Hope it can help you,
             Jerry
    Xing-Bing Yu

  • Send email to group

    I have created a group ... How can I send an  email to whole group without going through them individually ?

    Thanks Mr Peck !   I have just bought an app which does the trick ... Pity I have had to buy an app for something so basic ....
    My group was created manually on my iPad - after unsuccessfully trying to sync groups with gmail for the last 2 months...
    Groups seem to be a problem ... You cannot drag contacts into a group on the iPad... Well, I couldn't anyway. 
    But Mail shot Pro is easy to use.
    thanks.

  • Sending email to groups in address book always fails

    I set up groups in my address book so I can send an email to a group of contacts without having to select a bunch of names individualy. It seemed to work fine at first but, now every time I try this, the email kicks back a lot of the email names with a message saying the server does not recognize them. I don't get it. What can I do to fix this? HELP!

    Do all the contacts in the group have a valid email address? What does the server complain about exactly (without revealing the actual email addresses)?

  • How do you send email to groups with Apple Mail

    How do you select a group from Address book to use in email address?

    Either select the group from the AddressBook within Mail and choose recipient field (TO, CC, or BCC) or just type the group name in the recipient field.
    The group name should show in the field or right click on the group name to expand the addresses.

  • Send email from custom workflow to group

    Hi!
    We have Office 365 A2 Plan subscription. We use InfoPath form to submit travel request and custom 2013 workflow made in Sharepoint Designer 2013 to route that form for approval.
    If we send email using workflow to individual user it works fine.
    Problem occurs when we try to send email to group. we can't send email to security group made in office 365, distribution group from exchange online or security group in exchange online.
    My question is: is there any kind of group inside Office 365 (Sharepoint Online or Exchange online) that we can send mail to using workflow and if that is possible, how can we do that?
    Thank you,
    SD

    It is simple powershell script and without such small changes it may not work
    May be Office365 team might have given you there AD. If users are in your AD then you need t make sure normally users from outside org can send you email on that email address. 
    Try to use this email address in Office365 and check if that helps. mostly without AD sync it is difficult

Maybe you are looking for