The bottom line: In Contact Form 7, you can send an auto answer to the user. It is necessary to make this auto answer work after a period of N minutes after the user clicks "send". How to implement it? Any ideas?
- Through an intermediate postal service, setting up rules there. A php can not defer work. Well, theoretically, you can not send and write to the database, and then pull the crown, but this is not CF7. Or CF7, with several additions, including its own - already to initiate the shipment. - SeVlad
- Using the CF7 is optional. In what form and how can you realize a pause before shipping? The message that the user sends to me must also be delayed by N minutes. - user9
- @SeVlad What intermediate service will provide a pause? There is no possibility of delay in the rules of Yandex autoresponder. - user9 9:04 pm
- At intervals, use not an answering machine, but sending by krone. I accepted the letter - formed the answer - put it "on the dispatch" - pulled the crown (eg every 10 minutes). Essno can be done only on your server. In any case, I have not seen this in public. - SeVlad
- Great idea, just implement the delay in sending a letter on the server, and send an auto-answer from Yandex. The user's letter should immediately form and be queued. Next cron will launch a periodic task. The task looks that there is not sent mail and does the part. How to put a letter in the queue? - user9
|
1 answer
php is not an asynchronous programming language. For this, javascript is needed with the help of function settimeout ()
example
function func() { //здесь твой логика } setTimeout(func, 1000); 1000 means 1 second
- could you explain more fully what file to write in and whether it is possible to make random time. - user9
- a .js file to make a random time example setTimeout (func, Math.random () * 10000); - Aram77778
- so what should we put inside the function function func () which file should be edited according to which condition and where should the function be called from? Do you need to add anything to this form? - user9
- the function calls setTimeout here (FUNC {{// here}}, 1000); inside the function func () function, your logic is to send an auto-answer to the user - Aram77778
|