How to trigger email confirmation after completing form thru API