Title: How to send data from a form without receiving a response Post by: Mamar on June 25, 2018, 10:32:28 AM HI Danijel,
I want to send data from a form in an email without receiving a response from the server. I manage to send an email with a form with the POST method and I manage to retrieve them in a RtcDataProvider on the server. However, I do not want to open the browser to send the data. Do you know how to do this? Thank you in advance. Best regards. Martial Title: Re: How to send data from a form without receiving a response Post by: D.Tkalcec (RTC) on June 25, 2018, 07:23:03 PM Sorry, but I don't understand your question.
Title: Re: How to send data from a form without receiving a response Post by: Mamar on July 13, 2018, 10:22:12 AM Danijel,
I expose you my problem: 1 - With a TRtcHttpServer I send an email with a TIdSMTP. ---> it works 2 - The message is formatted as a form with hidden fields to send data with the POST method. ---> it works 3 - I manage to send the data thus formatted to the server TRtcHttpServer / RtcDataProvider ---> it works My question is, how can I send the data without opening the browser to receive the answer? How to format the WEB page sent in the email? Should I use AJAX, JSON, JavaScipt, WebSocket or something else to format the HTML form sent in email without triggering the browser opening? Thank you in advance. Best regards. Martial Title: Re: How to send data from a form without receiving a response Post by: D.Tkalcec (RTC) on July 13, 2018, 03:59:54 PM As far as I know, the Server does NOT have direct control over Clients. When a Server receives a request from a HTTP/S Client, it can send back a HTTP/S response, but the Client decides what to do with that response. The Server could disconnect the Client after receiving the request instead of sending a response back (you can call Sender.Disconnect from the OnCheckRequest or OnDataReceived event), but I doubt this will have the effect you wanted.
Frankly, I find it unlikely that an E-Mail Client will be sending out a HTTP/S request to a Server and checking the response before it decides what to do. It's more likely that the E-Mail Client will be invoking the Web Browser to send the HTTP/S request (and receive the response) immediately after the user clicks on the URL or a button on the HTML page, so ... whatever the Server did after that would make no difference. Anyway ... here's a website I've found while googling for "HTML inside E-Mail", which you might want to check out: https://mailchimp.com/help/limitations-of-html-email/ |