0

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

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
cWilk
  • 143
  • 2
  • 3
  • 9
  • "uses jsonp to send a CORS request" — JSONP will never send a CORS request. There isn't really such a thing as a CORS request, although a preflight OPTIONS require might be what you are thinking of, but that is only triggered when using XMLHttpRequest. – Quentin Jun 26 '15 at 10:01
  • This may be insightful: http://stackoverflow.com/questions/1088016/html-email-with-javascript – Drakes Jun 26 '15 at 10:05

1 Answers1

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.
Riddler
  • 566
  • 2
  • 10