Search code examples
amp-email

How to post AMP form in Gmail?


When i post AMP form in gmail . The post request is automatically changed .

My Amp form in Gmail has post url is : ttps://www.mydomain.com

But when i post the form : Google changed below url

Request URL: https://dynamicmail-pa.clients6.google.com/batch?%24ct=multipart%2Fmixed%3B%20boundary%3Dbatch724748072440623450

Hence i haven't received the form posted data to my server .


Solution

  • https://dynamicmail-pa.clients6.google.com/batch?%24ct=multipart%2Fmixed%3B%20boundary%3Dbatch724748072440623450 is the URL of the XHR proxy server endpoint, which is supposed to proxy your POST request to your server. You should see your original request to www.mydomain.com wrapped inside the proxy request. If you don't see the request received by your server, then there must be something else at play. You should provide more debugging information, such as the response payload of the proxy call and if there's any errors in the console.