Send mail to several SharePoint Group

  • 13 July 2012
  • 7 replies
  • 3 views

Badge +3

Hi,


Surprisingly, I didn't find other posts on that topic, so here it is :


I want to send a mail to every users of several SharePoint groups.


I added the mail event and in the "To" field, I put my SharePoint groups. In the wizard it displays as "Users and Groups.Get E-mail For Group users.Email".


It looks like what I want to do, but at runtime, I got an error on that event : "The email adress Null or empty does not meet the requirements".


I don't think I changed anything, but now the error message is more like : "A recipient must be specified".


So, two questions :


 - Do you know what the real problem is ? (the users in my groups have an email adress, so the method should not return an empty value)


 - How do you usually do to send email to SharePoint groups ?


 


Regards


7 replies

Badge +1

I am having the same issue.  How do you send to everyone in a SharePoint group?


 


 

Badge +4

Hello,


The way you've addressed your e-mail is fine and should work. I personally like to edit the destination rule, however, and add each SharePoint group as a destination set as opposed to dragging the group from the context menu; I find this a little easier to read/manage. At one point, there was a bug where the details of the smartobject call you mentioned were not getting populated correctly. I don't know if this is fixed at the moment or not.


- I've seen this issue before. I would recommend executing this method manually via the SmartObject tester tool (Expand "All SmartObjects", right click "Users and Groups", Execute, select the appropriate method).


This will show you all of users in the group and whether their SharePoint profiles really do contain an e-mail address. Remember, the SharePoint user information list is different from the profile database which is different even still from AD. If ANY of the users returned by the SmO Tester Tool shows no e-mail address, you will get the "Email address Null or empty" error. I suspect this is the root of your problem and you will need to fix the offending profile in SharePoint.


- Instead of dragging this method into the "TO" line, I would set an advanced destination rule for the activity, as I mentioned, then check "Destination User" in the e-mail event wizard as opposed to specifying a "To" address.


HTH,


Tyler


 

Badge +1

Thank you Tyler.


This was the cause of my issue.  I had a user with no email address.


I fixed the user's email address in AD and the User Profile service but it took hours to propagate down to K2.  Is this information cached somewhere in K2?


It is also troubling that this is not trapped within K2.  If you have a user with a null email address, the whole workflow crashes on you.


 


 

Badge +3

Hi,


Thanks for the answer, I will check it out as soon as I can and let you know if it was the issue.


Regards

Badge +4

Hi Labrat,


Glad that fixed it!


I'm not sure what version you're running, but by default I believe the cache for SP groups is set at 2 hours. Have a look at the following blog, it might help you tweak it:


http://www.k2underground.com/blogs/johnny/archive/2011/10/03/working-with-the-identity-service-caching-mechanism.aspx


Regarding error trapping; I personally submitted feature requests a while back for something a little more robust in this area (errors and e-mail events). I'm not aware of any work in this area just yet. If you're so inclined, you could also submit a feature request along these lines.


Tyler

Badge +3

Hi,


Indeed one of the users from one of the group doesn't have an email in his SharePoint profile.


I can guarantee all users will have correct emails in those groups, so I guess I'm stuck if I want to do this...


Thanks for the help :)

Badge

Hi,


I am facing the " ErrorMailEvent The email address, Null or Empty, does not meet the requirements" when i have used processoriginatoremail in To address of mail event. i want to know from where k2 picks Originator email address internally.


This error is happening with only some users.


please someone resond , i got stuck with this issue.


 


Regards,


Prathima


 

Reply