Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-27 Thread Peter

  Subject:  [PHP] Sending out mass mail without having timeout problems
..

Hi,

Too much trouble to write who wrote what when. Someone suggested using an
alias but that's not always doable.

I had an app that read from a live rdbms and sent out emails. I sent each
email to sendmail and waited fo it to send the email before going on to the
next one. My cohort determined that this was way, way too slow. He did some
research and added some new parameters to sendmail so that the email was put
in a queue and so the script ran MUCH faster.  I believe these were the
parameters. You should look them up on the sendmail site:

sendmail -oi -t -odq

Hope this helps.

Peter



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-27 Thread Jesus Maria Bianco T.

Hi,

If you will send a lot of e-mails, I recomend you, that use under the Console:

$rush  nohup php -q file_send_email.php 

The nohup, tell to maquine that don't hang up until finished.

php -q (quiet mode) and the last character () for let the process in background.

It's only works on *nix Boxes, I don't think that will work under M$ windows.

Bye,


At 12:02 PM -0600 27/12/01, Peter wrote:
   Subject:  [PHP] Sending out mass mail without having timeout problems
..

Hi,

Too much trouble to write who wrote what when. Someone suggested using an
alias but that's not always doable.

I had an app that read from a live rdbms and sent out emails. I sent each
email to sendmail and waited fo it to send the email before going on to the
next one. My cohort determined that this was way, way too slow. He did some
research and added some new parameters to sendmail so that the email was put
in a queue and so the script ran MUCH faster.  I believe these were the
parameters. You should look them up on the sendmail site:

sendmail -oi -t -odq

Hope this helps.

Peter



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

__
Jesus Maria Bianco Troconis (yisu)

E-MAIL mailto:[EMAIL PROTECTED]
ICQ4792036 / nickname yisu
WEBhttp://yisu.net

 Telefono/Phone  +58 (414) 3042346
 (Ciudad/City) Caracas, Venezuela

  Mac, PHP  MySQL Rulez.
They Kick some ass!
__


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-27 Thread Paul Roberts

can this be set in the php file or htaccess with

sendmail_path =pathtosendmail/sendmail -oi -t -odq;


Paul Roberts
[EMAIL PROTECTED]


- Original Message -
From: Peter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 27, 2001 6:02 PM
Subject: Re: [PHP] Sending out mass mail without having timeout problems ..


   Subject:  [PHP] Sending out mass mail without having timeout problems
 ..

 Hi,

 Too much trouble to write who wrote what when. Someone suggested using an
 alias but that's not always doable.

 I had an app that read from a live rdbms and sent out emails. I sent each
 email to sendmail and waited fo it to send the email before going on to
the
 next one. My cohort determined that this was way, way too slow. He did
some
 research and added some new parameters to sendmail so that the email was
put
 in a queue and so the script ran MUCH faster.  I believe these were the
 parameters. You should look them up on the sendmail site:

 sendmail -oi -t -odq

 Hope this helps.

 Peter



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Sending out mass mail without having timeout problems ..

2001-12-19 Thread Robert V. Zwink

?php
// put this stuff at the top of the program
set_time_limit(0);
ignore_user_abort(1);

// your mail stuff goes here
// once you access the script, close your browser, 
// it should run in the background until finished.


?
http://www.php.net/manual/en/function.set-time-limit.php
http://www.php.net/manual/en/function.ignore-user-abort.php

Robert V. Zwink
http://www.zwink.net/daid.php

-Original Message-
From: bain [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 11, 2001 3:41 AM
To: php general list
Subject: [PHP] Sending out mass mail without having timeout problems ..


Hi all 

I've been working on a system for our company that uses MySQL to grab
user data and then send personalized mail to them once a month. 

currently I step thought the mysql result mailling one mail per return.

as you can imagine .. my script timeout value is sitting on 24hours to
allow all the mail in our big database to go throught.

Is there a way I can fork or thread the mail send process so I can send
more then one mail at a time .. or maybe even buffer the MySQL result
and send the mail in the background but still return the browser .. 

any sugestions .. please

-- 
Henti Smith
Systems Administrator
The House Of Synergy
http://www.thos.co.za
[EMAIL PROTECTED]
+27 11 259-9821
--

Let us not look back in anger or forward in fear, but around us in
awareness.
-- James Thurber


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-14 Thread Kevin Stone

You might try something like this.  First estimate the number of emails that
you can send out in 30 seconds (or however long the timeout is).  Hard code
that value into your script.  Use the location header method to redirect the
script back to its self sending along a new variable $row in the GET string.
This var refers to the next start row in your database.
header(location:http://www.mydomain.com/myscript.php?row=$row;).  Include
an if() statement somewhere in there to break from the loop when you've
reached the end of your database.  Doable?

-Kevin Stone


 On Thu, 2001-12-13 at 23:13, jimtronic wrote:
 
  Wouldn't it be easier (better) to create a sendmail alias include
  file that has all the addresses in it and let sendmail or majordomo
  or qmail or whatever handle it?
 
  I'm not knocking your method as much as I'm looking for the pros and
  cons of the different methods.

 You missed the actual question :)

 I have to do variable replacing in the message to customize it per
 client in the database :)

 so I step through the result set and send per result.

 the problem is I want to get around the max_timeout limit on script
 execution as this gets in the way if the list gets very big .. and I
 don't want to up the limit for all php scripts being used on the site ..

 HEnti


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-14 Thread Paul Roberts

how do I do that on a virtual server? (Linux+apache, I'm just a user not
admin)
the con is that I can't afford the phone bill, I'm on a dial up (56K).


Paul Roberts
[EMAIL PROTECTED]

- Original Message -
From: jimtronic [EMAIL PROTECTED]
To: Paul Roberts [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, December 13, 2001 9:13 PM
Subject: Re: [PHP] Sending out mass mail without having timeout problems ..



 Wouldn't it be easier (better) to create a sendmail alias include
 file that has all the addresses in it and let sendmail or majordomo
 or qmail or whatever handle it?

 I'm not knocking your method as much as I'm looking for the pros and
 cons of the different methods.

 jim

 the way I handle this is to send a response to the browser before sending
 any mail you can then close the browser window and the script will carry
on
 while you do something else. I get the script to send me an email when
its
 finished 2-3 hours later. (I have around 6000 newsletters that are sent
out)
 
 Paul Roberts
 [EMAIL PROTECTED]
 
 - Original Message -
 To: bain [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, December 11, 2001 8:39 AM
 Subject:  [PHP] Sending out mass mail without having timeout problems ..
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


 --
 Jim Musil
 -
 Multimedia Programmer
 Nettmedia
 -
 212-629-0004
 [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-13 Thread Paul Roberts

the way I handle this is to send a response to the browser before sending
any mail you can then close the browser window and the script will carry on
while you do something else. I get the script to send me an email when its
finished 2-3 hours later. (I have around 6000 newsletters that are sent out)

Paul Roberts
[EMAIL PROTECTED]

- Original Message -
To: bain [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, December 11, 2001 8:39 AM
Subject:  [PHP] Sending out mass mail without having timeout problems ..




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-13 Thread jimtronic


Wouldn't it be easier (better) to create a sendmail alias include 
file that has all the addresses in it and let sendmail or majordomo 
or qmail or whatever handle it?

I'm not knocking your method as much as I'm looking for the pros and 
cons of the different methods.

jim

the way I handle this is to send a response to the browser before sending
any mail you can then close the browser window and the script will carry on
while you do something else. I get the script to send me an email when its
finished 2-3 hours later. (I have around 6000 newsletters that are sent out)

Paul Roberts
[EMAIL PROTECTED]

- Original Message -
To: bain [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, December 11, 2001 8:39 AM
Subject:  [PHP] Sending out mass mail without having timeout problems ..




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-13 Thread bain

On Thu, 2001-12-13 at 23:13, jimtronic wrote:
 
 Wouldn't it be easier (better) to create a sendmail alias include 
 file that has all the addresses in it and let sendmail or majordomo 
 or qmail or whatever handle it?
 
 I'm not knocking your method as much as I'm looking for the pros and 
 cons of the different methods.

You missed the actual question :) 

I have to do variable replacing in the message to customize it per
client in the database :) 

so I step through the result set and send per result.

the problem is I want to get around the max_timeout limit on script
execution as this gets in the way if the list gets very big .. and I
don't want to up the limit for all php scripts being used on the site ..

HEnti 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-13 Thread Andrew Brampton

You can set the max_timeout varible to zero at the begining of the script
and it will continue forever...

I once did this for a PHP IRC Bot... (which was kinda cool :))

Andrew
- Original Message -
From: bain [EMAIL PROTECTED]
To: jimtronic [EMAIL PROTECTED]
Cc: php general list [EMAIL PROTECTED]
Sent: Thursday, December 13, 2001 10:12 PM
Subject: Re: [PHP] Sending out mass mail without having timeout problems ..


 On Thu, 2001-12-13 at 23:13, jimtronic wrote:
 
  Wouldn't it be easier (better) to create a sendmail alias include
  file that has all the addresses in it and let sendmail or majordomo
  or qmail or whatever handle it?
 
  I'm not knocking your method as much as I'm looking for the pros and
  cons of the different methods.

 You missed the actual question :)

 I have to do variable replacing in the message to customize it per
 client in the database :)

 so I step through the result set and send per result.

 the problem is I want to get around the max_timeout limit on script
 execution as this gets in the way if the list gets very big .. and I
 don't want to up the limit for all php scripts being used on the site ..

 HEnti


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending out mass mail without having timeout problems ..

2001-12-12 Thread Andrey Hristov

In background :
1)$result_does_not_matter = `/path/to/your/massmailer.php 1mail_std_out.log 
2mail_std_err.log `;
2) use exec with cmd as the above.
With PHP you can write PHP shellscripts:
#!/usr/local/bin/php -q
?php
// ...some code here
// in the code you may use sleep() or usleep() in a cycle. The cycle uses one big 
result set which had been got before the cycle or
makes like this:
//  $res= mysql_query(''select email from employee limit .$start++.,1);
// list($email) = mysql_fetch_array($res);
// mysql_free_result($res);
?

HTH

Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS



- Original Message -
From: bain [EMAIL PROTECTED]
To: php general list [EMAIL PROTECTED]
Sent: Tuesday, December 11, 2001 10:41 AM
Subject: [PHP] Sending out mass mail without having timeout problems ..


 Hi all

 I've been working on a system for our company that uses MySQL to grab
 user data and then send personalized mail to them once a month.

 currently I step thought the mysql result mailling one mail per return.

 as you can imagine .. my script timeout value is sitting on 24hours to
 allow all the mail in our big database to go throught.

 Is there a way I can fork or thread the mail send process so I can send
 more then one mail at a time .. or maybe even buffer the MySQL result
 and send the mail in the background but still return the browser ..

 any sugestions .. please

 --
 Henti Smith
 Systems Administrator
 The House Of Synergy
 http://www.thos.co.za
 [EMAIL PROTECTED]
 +27 11 259-9821
 --

 Let us not look back in anger or forward in fear, but around us in
 awareness.
 -- James Thurber


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]