Problem: If you have a Newsletter list, which is longer than your hourly limit for send/receive emails and Phoca Email component does not have a tool to solve this limitation, server will block your Newsletter sending when limit will be reached. Ok, server might send them latter, but I am not confortable with bumping in to the limits.
One of possibe workarounds:
Slice complete list (let's say list no. 1) in multiple sublists which are smaller, than the hourly server limit. My server limit is 300 and I have decided to cut the list in 200 subscriber groups in list 2, 3, ... I did it in PhpMyadmin with SQL command:
---
INSERT INTO <database_name>.phocaemail_subscriber_lists (id_subscriber, id_list)
SELECT id, <list_number>/*<list_number> is from the <database_name>.phocaemail_newsletter_lists number of the list we want to assign the same subscriber*/
FROM <database_name>.phocaemail_subscribers
LIMIT 200 OFFSET 0;/*LIMIT=size of sublist, OFFSET=0 for 1st sublist, 200 for second etc. (multiple of LIMIT size)*/
---
WARNING: before you try this at your own risk, please make backup of the tables which you are using, or backup complete site.
SQL code for table backup:
---
CREATE TABLE <backup_table_name> AS SELECT * FROM <existing_table_name>;
---
If complete list is named News, 1st sublist will be News1, then News2...
When you send Newsletter instead of sending it directly to News list, you will sent it first to News1, one hour after that to News2 and so on.
Please reply to my post with description of other ways to solve the problem of not reaching hourly email limit when you sending Newsletter. Thanks!
Workaround server limit for emails sent an hour
-
- Phoca Newbie
- Posts: 6
- Joined: 21 Aug 2023, 08:42
- Jan
- Phoca Hero
- Posts: 48428
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Workaround server limit for emails sent an hour
Hi, thank you very much for your information.
Sending emails is a specific feature, mostly OK on severs, but sending mass emails is another case. This is very problematic because of different limits (which is reasonable due to all the spam attacks). So if the amount of sent emails is too much for the server, then there is no other option than talk to your webosting provider and change limits
Jan
Sending emails is a specific feature, mostly OK on severs, but sending mass emails is another case. This is very problematic because of different limits (which is reasonable due to all the spam attacks). So if the amount of sent emails is too much for the server, then there is no other option than talk to your webosting provider and change limits
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 21 Aug 2023, 08:42
Re: Workaround server limit for emails sent an hour
I agree with you, Jan, and i did check what options are about changing limits with my provider. But it turns out that this option which would be changing my hosting package is quite expensive and there would still be a limit, which I might bump into quite fast in the near future. I would really like an option in newsletter component, where sending would go with send 10 mails, witing for 3 minutes and repeat until all mails are sent. In that case there is no limitation of mailing list and it would be very friendly to web server not using big chunk of server capacity for minute or two, but rather sending them almost one by one.
But nevertheless thank you for nice component and your answer!
But nevertheless thank you for nice component and your answer!
- Jan
- Phoca Hero
- Posts: 48428
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Workaround server limit for emails sent an hour
Hi, each webhosting is different, but the command to send emails is made by ajax, so you can change the Javascript library to have some time limits (e.g. add the to loop that when the command is e.g. 10, wait 3 minutes and then continue)
The Javascript can be found here:
administrator/components/com_phocaemail/views/phocaemailsendnewsletter/tmpl/default.php
Jan
The Javascript can be found here:
administrator/components/com_phocaemail/views/phocaemailsendnewsletter/tmpl/default.php
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 21 Aug 2023, 08:42
Re: Workaround server limit for emails sent an hour
Great! This would be the right way to do. I will try to experiment with this code. Thanks!
-
- Phoca Newbie
- Posts: 6
- Joined: 21 Aug 2023, 08:42
Re: Workaround server limit for emails sent an hour
Well, I think I did it. I modified /administrator/components/com_phocaemail/views/phocaemailsendnewsletter/tmpl/default.php in a way that Phoca Email component is sending 1 mail every 20 seconds (180 an hour), but this time interval can be changed with just changing one value in code.
I have sent you file via email for review if you have time.
I have sent you file via email for review if you have time.
- Jan
- Phoca Hero
- Posts: 48428
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Workaround server limit for emails sent an hour
Hi, thank you very much, I will take a look at it.
Thank you, Jan
Thank you, Jan
If you find Phoca extensions useful, please support the project
- Nidzo
- Phoca Professional
- Posts: 400
- Joined: 07 Nov 2018, 14:55
Re: Workaround server limit for emails sent an hour
Is this included in Phoca Email 5 and can we see that code?emario wrote: ↑30 Aug 2023, 11:50 Well, I think I did it. I modified /administrator/components/com_phocaemail/views/phocaemailsendnewsletter/tmpl/default.php in a way that Phoca Email component is sending 1 mail every 20 seconds (180 an hour), but this time interval can be changed with just changing one value in code.
I have sent you file via email for review if you have time.
- Jan
- Phoca Hero
- Posts: 48428
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Workaround server limit for emails sent an hour
Hi, unfortunately, I still didn't find time to take a look at it, the code can be seen here:
https://github.com/PhocaCz/PhocaEmail/issues/4
Jan
https://github.com/PhocaCz/PhocaEmail/issues/4
Jan
If you find Phoca extensions useful, please support the project