Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'd like to have all attendees to be notified via email that they have been invited to an event from a Sharepoint calendar. How can I do this?

share|improve this question

4 Answers 4

up vote 6 down vote accepted

You could create a column for the calendar that is "attendees" that is a people or group type column. Then you can create a very simple workflow that will send an email to those people who are entered. This could be done with SharePoint Designer.

share|improve this answer
4  
Default calendar list already has column Attendees (internal name: ParticipantsPicker). For some reasons beyond my knowledge this column is not attached to default Event content type. –  Vedran Rasol Jul 26 '11 at 22:22
    
Thanks, that sounds like an excellent solution. –  nfw Jul 26 '11 at 22:56

Here is my implementation of Vedran's answer:

First, in a feature receiver, I swapped the Event content type with the Schedule content type to take advantage of the Attendees field (and the cool Free/Busy field!):

SPList list = lists["Calendar"];
SPContentType newContentType = 
    list.ContentTypes.Add(list.ParentWeb.ContentTypes[SPBuiltInContentTypeId.Schedule]);
SPContentType oldContentType = list.ContentTypes[0];
string name = oldContentType.Name;
string description = oldContentType.Description;
oldContentType.Delete();
newContentType.Name = name;
newContentType.Description = description;
newContentType.Update();

The form now looks like this:

enter image description here

Second, I added an Event Receiver that sends the notices:

public override void ItemAdded(SPItemEventProperties properties)
{
    SPList list = properties.List;
    SPListItem item = properties.ListItem;
    SPFieldUserValueCollection values = item[SPBuiltInFieldId.ParticipantsPicker] as SPFieldUserValueCollection;

    List<string> emails = new List<string>();
    foreach (SPFieldUserValue value in values)
    {
        SPUser user = value.User;
        if (!string.IsNullOrEmpty(user.Email))
        {
            emails.Add(user.Email);
        }
    }

    if (emails.Count > 0)
    {
        StringDictionary headers = new StringDictionary();
        headers.Add("to", string.Join(";", emails.ToArray()));
        headers.Add("subject", item.Title);
        SPUtility.SendEmail(web, headers, body);
    }
}

It works great.

share|improve this answer
2  
+1 because I like Free/Busy field –  Vedran Rasol Sep 21 '11 at 20:24
    
Definitely. A gem hidden in plain sight! It's the main reason I posted this as an answer. –  Rich Bennema Sep 21 '11 at 22:40

One of solutions is to add new people type column (or use OOTB Attendees column) to calendar for storing meeting attendees.

Then you can write custom event receiver for calendar list that handles email notification(s) according to meeting changes (attendee added, deleted, meeting canceled etc.). This approach is not simple but has some benefits (you can easily redeploy solution to affect other calendars).

I need to point out that SharePoint calendar doesn't provide OOTB function to easily receive auto meeting responses (like eg Exchange). This makes most of the new SharePoint users quite unhappy.

share|improve this answer
    
Thanks. Yes, this was a direct request from a customer, so I am looking into ways of giving a similar function to exchange. It looks like they will have to adapt or keep their old practices. –  nfw Jul 26 '11 at 22:58

When you create the event/meeting you can optionally create a meeting workspace. Within the meeting workspace you can add attendees. Once added, they receive an email notification and from there can choose to accept or decline.

I can give you step-by-step instructions if needed.

EDIT: We had implemented an intranet a couple years back at a former employer and managed our client meetings with workspaces. I thought the emails were sent automatically when the item was added to the Attendees list, but after a closer look it appears someone added a workflow to the Attendees list to send the email when a new Attendee is added to the list. Per Lori's answer you could extend the calendar list with a column and attach a workflow or attach a simple workflow to the Attendees list...either approach would work.

Sorry if this sent you down the wrong path.

share|improve this answer
    
Thanks, your answer was useful –  nfw Jul 26 '11 at 22:56

protected by Community Jan 16 '13 at 8:48

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.