Approve/Reject in email generated by SharePoint - sharepoint

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

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.

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 (...) 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.

Related

Modify message with an Outlook web add-in (when reading email, not composing)

I'm trying to establish if this is even possible:
Can an outlook web add-in (i.e. a JavaScript add-in that works on the web and in outlook, not a COM based add-in) modify the body of an email while in read mode (i.e. the user is reading an email, not composing a new email or replying to an email).
What I need to do is trigger the add-in if the email contains hyperlinks (looks like I can do that with a contextual add-in using a regular expression) and then modify those hyperlinks (change the href or add an onClick event handler) so if the user clicks them the behaviour is different.
Based on #OutlookAdd-insTeam-MSFT comment I'll post my own answer:
You cannot modify the body of an email in read mode.
:(
Cant comment. Not enough rep.
I am looking at the documentation for Read Scenario I dont see anything related to set property.
However I do see something about extracting info from an item, more importantly extracting URL's
May be you can extact URL's do your modifications and with the new content you can create a New message item or even Reply and Reply all
It should be able to do that using calling UpdateItem via EWS from the add-in, right? See https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/updateitem-operation
Why wouldn't that work #microsoft?

Embedding customize sender view

We want to open sender view of draft/created envelope in our application using REST API and allow sender/user to add signature fields/tags in documents. This sender view currently shows and allow all the options where sender can add new recipient or modify, can change the document and etc. But we want to restrict sender to only can add/edit signature fields/tags, we do not want to allow user to modify any other envelope information or even can send from there.
In short words: Want to open sender view of envelope only for edit signatory fields/tags using REST API.
Could anyone help how we can achieve this.
You can start the view on the tagging page by adding send=1 to the API call. Eg:
https://demo.docusign.net/restapi/v2/accounts/{account_id}/envelopes/{envelope_id}/views/sender?send=1
However the user can still go back to the recipients page if they want to by using the "Other Actions" menu item.
An alternative is for you to figure out what your users need to do on the tagging page and do it for them programmatically. That way you're both providing a better user experience for them and you don't have to worry about them changing the recipients or documents.
What are they doing on the tagging pages? It is not hard for you to programmatically place the tags by using anchor field locating. See the recipe.

Email sent from lotus notes which includes sent form not working in gmail

While sending email from lotus notes to Gmail using Lotus Script, buttons are not visible in Gmail.
As Anders says, Any standard or custom Action Buttons (at the top) will not be available in Gmail. You would need to code your own Gmail interface to reproduce.
If you are talking about buttons in the actual rich text of the mail, these will definitely not get translated when the mail leaves and you should get a message saying...
"The following items cannot be sent or saved in MIME (internet mail) format."
That would be a clear sign that you are going to need to take another look at your assumptions.
If you are planning a migration, you do need to check your assumptions (and your vendor's promises) carefully, there is a lot of infrastructure and functionality that is taken for granted in the Notes/Domino stack and just not available, or significantly different, in others.
Stored forms are a feature that is unqiue to Notes. They contain Notes design elements, formulas and scripts that execute Notes functions that are provided by the Notes API DLLs that are only available in the Notes client. GMail doesn't know anything about them. Outlook doesn't know anything about them.
But if you want to send them to someone who has a GMail address but who also has the Notes client, then there is a way to do it manually using the "Send this email to other Notes mail user(s) through the Internet" feature, which appears in the Advance tab of the Delivery Options dialog that you can bring up when sending a message. There is no simple API for automating the mechanism that is used, but it can be done. It requires creating a new empty database file with a special name (encap.ond), saving your document into that database, and then attaching the the file to a new message, which will be the one that you actually send. I don't recall if any special headers are required for this, so if you want to pursue it you will have to do some investigation by using the manual process and checking out the full headers of the message on the receiving side.

Add custom text to Sharepoint Email Alert

We have an alert set-up for sharepoint list, but I want to add some custom text to the alert email. We do not have any access to SPD or sharepoint server and can make changes to sharepoint client only.
Can anyone please advice?
The code that sends out emails runs on the SharePoint server via the Timer Job. Since you have no access to do anything with the server you've got absolutely no chance of modifying the built in alert emails.
Could you do this with javascript?
You can't send emails with JavaScript directly. You can open up a draft email in a users default email client using a mailto link but this won't achieve what you want as a user will still have to edit it.
You could, I suppose, put some javascript onto an edit page using a content editor web part (which you can do without SPD) to on changes make an AJAX call to a separate web server to do the actual sending.

Custom E-Mail Event for Sharepoint Upon InfoPath Form Submit

A customer wants an e-mail notification sent to a select group of people when a new InfoPath form is submitted to a particular Document Library on their SharePoint 2007 setup.
Easy, right? Use a custom set of rules for an e-mail submission in InfoPath, plop in the addresses, use a fancy equation to construct a useful e-mail subject line... and done. Worked like a charm. Problem solved in just a few minutes...
However, the customer doesn't want the whole form e-mailed out or even attached to the e-mail. They only want a few select fields from the form in a very simple message.
I've tried writing an ItemAdded event handler from the SPItemEventReceiver base class, but it doesn't seem to do anything. Yes, I added the event handler to the GAC and created a Feature.xml and Elements.xml to register the event handler with SharePoint. But, I'm not sure if this is even the right event to customize. Is an item in a Document Library the same as an item in a List?
Has anyone had luck doing a similar e-mail notification event? Is there an easier way to accomplish what I'm attempting? Perhaps there's a way to do this easily through the SharePoint interface or edit the contents of the e-mail submission rule to be a simplified version of the form?
Any advice is greatly appreciated!
How about a very simple SharePoint Designer workflow that is triggered when the form is uploaded. From there you send an email and include content of the (exported) columns in an email body.

Resources