Search code examples
kentico

Creating form data via rest doesn't trigger autoresponder


Kentico 10. When I make a rest request to post data to the kentico form module I get a successful http 201 back and I can see the data created in the kentico interface. This particular form I am posting data to has an autoresponder set up.

I have a default smtp server set up and can successfully email out through it, which leads me to believe that the autoresponder on the form does not get triggered when data is created in the kentico form via rest. I never see the autoresponder attempt to send an email in either the email queue module or the event viewer (with the proper web.config key set).

Is that the intended behavior, to not trigger the autoresponder when forms module data is created via a rest request? If so, any idea how to get it to trigger?


Solution

  • Yes you are correct. Kentico REST is meant to perform simple CRUD operations. Essentially what you doing is the same as if you do it inside the admin i.e. go inside admin -> forms -> your form name -> recorded data and add new record. It doesn't trigger anything like sending email or Redirect to URL etc. What you can do if you want to send email using form global events and on insert send email yourself. Here is the example of using global events