FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » time consuming loop
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: time consuming loop [message #170885 is a reply to message #170884] Sun, 05 December 2010 13:06 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Paul Fredlein wrote:
> Hi,
>
> I'm trying to automate the emailing of my newsletter to my contact
> group.
>
> In php, I'm thinking of using an arrary of email addresses derived from
> a mysql contact list. Then looping through the array emailing each item
> with my newsletter.
>
> Originally, I played with this inside a mysql query and delaying each
> email by a second so that the host server doesn't think I'm a spammer.
> But then the calling php inside my browser just waited and became
> 'unresponsive'.
>
> So then I thought of the array of email addresses and wondered if
> there's a thread or callback mechanism I can use. Or perhaps I can keep
> track of a progress variable and use a smaller loop initializing a loop
> with the progress variable which is the index into the array - or
> something.
>
> To send the newsletter, I just open that php page in my browser and
> enter a password and away it goes.
>
> I'm sure this is not the proper way to do this but it's only for my use
> and not a commercial product or anythng like that.
>
> Thanks,
>
> Paul
>

I just built this for a small charity site.

Why not simply send the one email Bcc:'ed to all the recipients?


That will be queued in milliseconds, and go when the mailer gets around
to it.

My ISP is happy to let me do that. I asked them.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Demo PHP/Ajax slideshow server crashing
Next Topic: Apache + PHP module segfaults
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 15:47:40 GMT 2024

Total time taken to generate the page: 0.15343 seconds