Question

When I make a meeting in Outlook, the recipient gets a approve/reject button in the top of the email. I'd like to do a similar thing with SharePoint: when a task is created, an email is sent to the person the task is assigned to, and the email asks the recipient to either accept or reject the task. I've seen demos of people doing this with a custom ASPx page, but I'd like to make it directly in the email. How should I go about doing that?

I'm used to making workflows in Visual Studio, so I'm happy with code examples for setting up an email and/or parsing the response

Cheers

Nik

Was it helpful?

Solution

The approve/reject buttons in Outlook shows up because the email is in the iCalendar format. I dont know if this is the best way, but you can send out your own iCalendar emails using C# code and set the response email to a mail server you control. From that mail server you can process the email and use the SharePoint WebService API to approve the item in SharePoint.

OTHER TIPS

I like JMD's suggestion but I don't know how you'd interact with SharePoint from the mail server.

It might be a easier to send an HTML-formatted email with two links (<a href="...">...</a>) for the Accept and Reject buttons. You could use CSS to format them so that they look like real buttons.

You could then create an ASPX page (or better an IHttpHandler implementation) to perform an action based on parameters passed to it via a URL. You'd want to pass in the site, web and list details and the list item ID along with a value to indicate whether the item is approved or rejected.

Then set the URLs of your "buttons" in the email to call your handler and pass in the appropriate parameter values.

The downside to this is that the "buttons" would be part of the message body and not part of the Outlook chrome but, on the other hand, they would be usable from any email client.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top