PDA

View Full Version : Solved unable to change Auto Next Page timing


kenfuzed
12-03-2008, 06:35 PM
Upon encountering a fail when sending out my newsletter (exceeded host limit per hour) I'm unable to reset the "Wait how long" and "Sent per page" settings for a resend. When I change these and go to resend from the next page following the fail/halt, the resend starts using the previous settings.

Example:
First send I entered 180 and 60 for these settings. After halting the send after a few pages and returning to resend, I changed the settings to 300 seconds and 40 per page. I change the page to where the resend should resume, and upon launching the resend starts sending at the old 180/60 rate.

I am running 1.0.6 on vb 3.6.4

Greg
12-03-2008, 08:47 PM
That is normal. What you need to do is a little math. I guess I could write a utility.

So, you failed on page 2 lets say.

That would have been after 120 were sent and to continue at 121 for users.

If you change the perpage and do that math you'd be at the wrong user id.

Typically when you start over, you get the same email info for the previous send. all the settings stay the same.

I'll code a utility to figure this out. I'm so burnt from coding, I can't explain it.

Greg
12-03-2008, 10:06 PM
What I tried to say is that you can't do a resend and change the perpage. It messes up the count of course.

I'll write a part that can help with that. No big deal. I hope.

kenfuzed
12-03-2008, 11:29 PM
Thanks Greg, not a huge deal and I get the math part and how it complicates things when I change the setting. Maybe in a future release something cool would be the ability to specify a range of users to email (i.e email userid:100-200).

Appreciate everything you've done with this product.

Greg
12-04-2008, 12:06 AM
Yep, your problem and what it brought up will lead to just that. If you specify a resend we'll do the math or try to anyway.

Thanks!

bigH2O
12-04-2008, 12:34 AM
I've been chewing this over and wondering if the whole resend thing might not need to be rethought. I'm thinking that for very little overhead we could have an additional field that indicates whether or not that user had been "successfully" emailed yet.

We're already sitting on the user's record, so a simple INSERT INTO statement in the loop could eliminate the need to even worry about restarting pages. That's almost no processor at all, the only real overhead is one more TINYINT(1) field in the table. Set it to a 1 when the email has been has been sent. Modify the list creation query to check whether the sent field is a 1 or a 0 when building the list.

Of course the trade off is when it fails, that one user has already been marked as having been sent, so he won't get it. On the other side of the coin, if the page system fails 40 emails into a 60 mail page, and you start that page over, 40 people will get it twice.

At the end of the process, after all emails had been successfully sent, a single query could clear the sent field for the next time the newsletter goes out.

I don't think this would present any processor problems on anybody as long as the current "per page" limits are set within the limits of their server's ability to handle the traffic.

Greg, give me a shout if you want me to look into this further. I haven't looked at any code in this context yet... was just pondering it after seeing the problem that started this thread. I'll be happy to play with the queries for you and come up with an optimized solution. You'd be on your own for the php mods though... I'm just not up to speed enough on your code yet to know where to go.

Greg
12-04-2008, 01:07 AM
We are not sitting on the user table. It's long gone when we're are in the send loop. To run an update query for every user would be too much overhead.

I have thought about the last user sent flag too. I think we can do that after maybe every ten emails to the data table instead of the user table per user and put a last userid sent. Then you can be in the ball park.

To do an update to the table for every send will kill us I'm sure.

bigH2O
12-04-2008, 01:20 AM
Give me a call tomorrow if you want to talk about this. I need to understand the architecture a little bit more, but based on what you're telling me the ideas are starting to cook. I've got meetings early, so call after 10. Gotta crash now. Tomorrow starts way too early, and there's no avoiding it.

Greg
12-05-2008, 08:06 PM
I have this worked out. If you do a resend you will be told how to reset the per page setting to reduce the number of emails per page and resume right after where you left off within reason.

Of course this facility won't be needed once you have sent a few emails and you know the best settings to use with EZ NewsLetter.

The facility is very useful though if the send fails for reasons beyond our control to resume a send on the page after the last known page to have been processed. You can resend the last know page if you desire. You have to weigh the affects of dupe emails vs no email to a few members.