close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

My server limits emails sent to 500/hour. If i set email limits to 8 seconds between emails and the burst to 500 per 60 minutes should that work with the server limits. Trying to send 800 emails.

Thread began 6/02/2021 7:00 am by JBWebWorks | Last modified 6/14/2021 2:50 pm by Ray Borduin | 82 views | 12 replies |

JBWebWorks

My server limits emails sent to 500/hour. If i set email limits to 8 seconds between emails and the burst to 500 per 60 minutes should that work with the server limits. Trying to send 800 emails.

<?php
if (isset($_POST["submit1"]) || isset($_POST["submit1_x"])) { //WA Universal Email
$Email = new WA_Email("sendemail");
$Email->Redirect = "?success=true";
$Email->From = "House of Champions Stakeholders <hocstakeholders@hocstakeholders.org>";
$Email->BurstSize = "500";
$Email->BurstTime = "60";
$Email->WaitTime = "8";
$Email->addToFromRS("Recordset1","user_email");
$Email->addAttachmentFromForm("attach");
$Email->BodyFile = "webassist/email/templates/corporate-fullwidth/html.php";
if (function_exists("rel2abs") && $Email->Redirect) $Email->Redirect = $Email->Redirect?rel2abs($Email->Redirect,dirname(__FILE__)):"";
for ($emailGroup=0; $emailGroup<sizeof($Email->To); $emailGroup++) {
$Email->Subject = "".((isset($_POST["subject1"]))?$_POST["subject1"]:"") ."";
$Email->send($emailGroup);
}
$Email->close();
}
?>
Sign in to reply to this post

Ray BorduinWebAssist

Yes, that should work. It would send emails with 8 seconds in between each and send no more than 500 every 60 minutes.

Sign in to reply to this post
Did this help? Tips are appreciated...

JBWebWorks

Ray,
different problem...I ran the send mail program with the email limits as above and had less than 500 to send and got error 524 timeout.
see screen shot attached. Not sure where to go to correct this error?

Sign in to reply to this post

Ray BorduinWebAssist

This is because your hosting company is using Cloudflare... What hosting company are you using? Unfortunately cloudflare won't let scripts run for more than 100 seconds. I've been googling that error, but can't seem to find a work around. The only solution might be to use a cron to restart the send periodically. I could help with that in a premier support ticket.

Sign in to reply to this post
Did this help? Tips are appreciated...

JBWebWorks

I am using bluehost. They increased my email limit to 750 but if cloudflare timesout at 100 seconds, i still can't send all the emails in one session. I will talk to support again about the 100 seconds timeout and see if they can change anything. If not i will get back to you on a possible cron job. Would the cron job restart at the place it left off?

Sign in to reply to this post

Ray BorduinWebAssist

It would have to keep track and pick up where it left off. We would probably have to log the emails that need to be sent in a database table and loop through and delete them.

Sign in to reply to this post
Did this help? Tips are appreciated...

JBWebWorks

I just got off the phone with support at bluehost and they first tried to sell me on an upgraded account to fix the problem with cloudflare. I said i was not changing my account and could she fix my timeout problem with cloudflare. She said she could and then she said she changed my permissions with cloudflare and that it should fix my timeout problem. I have not tested it yet but will later today and let you know if it indeed did fix my timeout problem with cloudflare.

Sign in to reply to this post

Ray BorduinWebAssist

Good luck. There may be a way to turn off Cloudflare as well. If not, then I think I can figure out how to call the page through a cron or do a direct SSH call of the php page and fix it that way.

Sign in to reply to this post
Did this help? Tips are appreciated...

JBWebWorks

I noticed in the send mail set up there are two choices, send all emails at once and send 1 to each recipient. If i chose send all emails at once, would that complete before the 100 second timeout by cloudflare?

Sign in to reply to this post

Ray BorduinWebAssist

It might, but all recipients would show in the TO line together. You may run into other limits at that point.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...