Hi there ! :)
I'm using a form action that sends an email when an entry is created.
I have a very very large mailing list in my recipient area and I am using the following function:
https://formidableforms.com/knowledgebase/frm_send_separate_emails/
The problem is that when I create an entry, there are so many recipient emails that it generates a timeout after 20-30 minutes. Do you have a solution for the action to launch via the server and not via my browser session? Or how to avoid the timeout?
Thank you very much and have a nice day !
Many hosts prohibit launching bulk emails from within WordPress because of the load it places on server processes, especially if you're on a shared host. They often meter the rate of emails to 100/day or a small number per hour. If you have such a huge recipient list, why wouldn't you consider using a marketing platform like Active Campaign or something similar?
Hi !
Yes indeed, I manage the customer base of 50k on formidable form but I send with a Sendgrid smtp server.
<p>The problem of sending emails suddenly is not a concern. Sendgrid handles well. It is only the timeout of the function which transforms the list into a single mail which poses a problem. The moment I click "Create Entry"</p>
I suggest you contact your host and see if they'll permit you to raise the PHP timeout. You may also be able to increase the PHP timeout in cPanel. If you're on a shared server, don't be surprised if the host says no.
I'm at O2SWITCH, I was able to change the timeout from php.ini but it still causes a timeout, I don't understand. Can I send you an example of my php.ini to help?
You need to contact your host for help with adjusting the timeout with PHP. There are two reasons for which you may be experiencing a timeout:
Exhausted PHP memory limit or maximum execution time is set too low. Your host (O2SWITCH) should help you. Open a support ticket with them. The issue is not with Formidable Forms. It's because of your choice to send emails to a 50k long mailing list from within WordPress without having benchmark timings for your server. How long does your server take to process 50k records in one chunk? Your maximum execution time needs to exceed the baseline and your PHP/WordPress memory limit must be large enough to handle the request.
This requires access to your server. As community volunteers, we can't assist with that level of troubleshooting without accepting the job as a paid project. Contact your host for server setup assistance.
The browser does not launch form actions. Form actions are server functions and run through PHP via the submit. Browsers cannot execute PHP, only servers can.
Ha okay so the timeout would come from where? This happens when I create an entry (this problem has been present since I put the separation function)
I don't know what you mean by "since I put the separation function". Contact O2SWITCH for further assistance with configuring PHP. I'm closing this thread to further comment.
You cannot execute a form action in the browser. What you want to do is not technologically possible. Form actions are server processes only. If you can’t set the timeout on your server, change hosts or trigger the emails to be sent from a tool that is designed for mass emails like Active Campaign.
I really have the impression that you have not read everything I have indicated... I will perhaps wait for another person to answer me because I am repeating myself. Thanks anyway 🙂
I've read everything you said. What you want to do cannot be done. It is not feasible. You are asking to send emails that can only be sent from your server directly from your client browsers. Not only would you be stealing your client's bandwidth if it were feasible at all, but Form Actions can only be executed on the server because they are PHP processes. They cannot be executed in the browser.
I'm sorry you haven't received the answer you want. The answer is the right answer though for the problem you're trying to solve as you've described it. I shared your alternatives with you. You cannot execute form actions in the browser. It's not possible. If you wait for someone else to tell you something different, you'll be waiting for a very long time. Good luck.
As indicated, the mails are sent by Sendgrid. I use the formidable form SMTP module which sends mails directly from the sendgrid servers.
What currently poses a problem are not the actions but the script that I sent you several times (the one that transforms a list into a single email). The problem is that this function creates a timeout on my browser, the actions are not in question but the function of the formidable form documentation.
It doesn't matter that you are using sendgrid. That's not relevant to your problem You have a server timeout issue while executing a PHP script while processing a 50k mailing list. This can ONLY BE FIXED by changing the server timeout. If you can't change the server timeout, find a new host where you have more control over the server, or upload the entire mailing list to a tool designed to handle mailing lists like Active Campaign and where you can sort them by tags automatically. Sendgrid is not going to help you. It is a transactional email system, not a campaign system. You are not going to get a different answer from anyone else.
Agreeing with Victor. Some articles on the subject: Email Options
In practice with typical technology security standards, you or your host would likely be marked as a spammer if you were able to send out some mass amount of emails at once. It's just not how it works.
Please login or Register to submit your answer