Approving via email

时间:2015-06-26 09:58:03

标签: javascript email cors jsonp

I would like to generate an email with two buttons approve / decline. On clicking those buttons in the email body , make a call to my web service

I have the js written that uses jsonp to send a CORS request and am happy that works correctly

When embedding the html in the email body, it does nothing , I don't even see the button.. just text

I'm wondering is this scenario even possible or is there another route I should be taking

1 个答案:

答案 0 :(得分:0)

AJAX Requests cannot be made from Email Clients. They simply don't support that kind of functionality.

Consider

  • Generating two separate Web site URLs for Approve and Decline which show a action success message for either actions respectively.
  • Or Send the URL for the page that you just created through the mail and let the ajax request take responsibility from there.