Mail problem

Mail problem

am 01.08.2002 08:29:43 von Bartek Pawlik

------=_NextPart_000_0024_01C23935.9605AF00
Content-Type: text/plain;
charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

Sorry to be a little bit off topic.

I need a tool or script in PHP, that will automaticaly send e-mails to =
receipients taken from database.
For example 1 the same e-mail to 1000 receipients. B

Mail server is on different machine.

Thanks in advance

------=_NextPart_000_0024_01C23935.9605AF00--

RE: Mail problem

am 01.08.2002 08:38:59 von Russ

Could you not simply extract all the email addresses from the DB as you
would any other data, then loop thru the result set calling PHP's mail()
function for every record retrieved?

while($row=3Dmysql_fetch_assoc($result))
{
extract($row);
//Presume's '$email ' is the name of the field in which email addresses
are stored in your DB:
@mail($email,$from,$subject,$body);
}

or am I missing something??
Russ

-----Original Message-----
From: Bartek Pawlik [mailto:pawlikb1@poczta.onet.pl]
Sent: Thursday, August 01, 2002 2:30 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Mail problem


Sorry to be a little bit off topic.

I need a tool or script in PHP, that will automaticaly send e-mails to
receipients taken from database.
For example 1 the same e-mail to 1000 receipients. B

Mail server is on different machine.

Thanks in advance

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Mail problem

am 01.08.2002 08:47:09 von Bartek Pawlik

Of course, but

PHP is on Linux machine where I don't have sendmail, because my
mail server is on different machine, and that's my problem

Bartek

----- Original Message -----
From: "Russ"
To: "Bartek Pawlik" ;
Sent: Thursday, August 01, 2002 8:38 AM
Subject: RE: [PHP-DB] Mail problem


Could you not simply extract all the email addresses from the DB as you
would any other data, then loop thru the result set calling PHP's mail()
function for every record retrieved?

while($row=mysql_fetch_assoc($result))
{
extract($row);
//Presume's '$email ' is the name of the field in which email addresses
are stored in your DB:
@mail($email,$from,$subject,$body);
}

or am I missing something??
Russ

-----Original Message-----
From: Bartek Pawlik [mailto:pawlikb1@poczta.onet.pl]
Sent: Thursday, August 01, 2002 2:30 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Mail problem


Sorry to be a little bit off topic.

I need a tool or script in PHP, that will automaticaly send e-mails to
receipients taken from database.
For example 1 the same e-mail to 1000 receipients. B

Mail server is on different machine.

Thanks in advance

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Mail problem

am 01.08.2002 08:49:03 von Russ

Just looking at our php.ini file and we use an external machine to send
mail with when calling the mail() function.

I think you just need to change the directive for the path/URI to the
mail server you wish PHP to use, in your php.ini file.

HTH :-)
Russ

-----Original Message-----
From: Bartek Pawlik [mailto:pawlikb1@poczta.onet.pl]
Sent: Thursday, August 01, 2002 2:47 PM
To: php-db@lists.php.net; Russ
Subject: Re: [PHP-DB] Mail problem


Of course, but

PHP is on Linux machine where I don't have sendmail, because my=20
mail server is on different machine, and that's my problem

Bartek

----- Original Message -----=20
From: "Russ"
To: "Bartek Pawlik" ;
Sent: Thursday, August 01, 2002 8:38 AM
Subject: RE: [PHP-DB] Mail problem


Could you not simply extract all the email addresses from the DB as you
would any other data, then loop thru the result set calling PHP's mail()
function for every record retrieved?

while($row=3Dmysql_fetch_assoc($result))
{
extract($row);
//Presume's '$email ' is the name of the field in which email addresses
are stored in your DB:
@mail($email,$from,$subject,$body);
}

or am I missing something??
Russ

-----Original Message-----
From: Bartek Pawlik [mailto:pawlikb1@poczta.onet.pl]
Sent: Thursday, August 01, 2002 2:30 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Mail problem


Sorry to be a little bit off topic.

I need a tool or script in PHP, that will automaticaly send e-mails to
receipients taken from database.
For example 1 the same e-mail to 1000 receipients. B

Mail server is on different machine.

Thanks in advance

--=20
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Mail problem

am 01.08.2002 13:23:52 von Manuel Lemos

Hello,

On 12/31/1969 09:00 PM, Unknown Sender wrote:
> Of course, but
>
> PHP is on Linux machine where I don't have sendmail, because my
> mail server is on different machine, and that's my problem

If you are allowed, you can install sendmail in your machine and
configure to route all mail through the mail server.

If you can't, all you can do is to use some PHP SMTP client code to send
your messages.

In this case you may want to try this class that is optimized for
queuing messages for many recipients as you need.

http://www.phpclasses.org/smtpclass

You are strongly recommended to put all recipients in Bcc: because
queuing via SMTP is much slower than using a local mailer like sendmail
and it would take you a long time to queue if you send separate messages
for each recipient.

--

Regards,
Manuel Lemos


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Mail problem

am 05.08.2002 01:25:26 von Georgie Casey

maybe use a for loop and mail command.
should work

"Unknown Sender" wrote in message
news:002701c23924$da9b1e40$539f4dd5@administrator...
Sorry to be a little bit off topic.

I need a tool or script in PHP, that will automaticaly send e-mails to
receipients taken from database.
For example 1 the same e-mail to 1000 receipients. B

Mail server is on different machine.

Thanks in advance




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Re: Mail problem

am 05.08.2002 03:15:13 von Russ

See the php manual pages for the mail() function.

Calling mail multiple times is a very inefficient way of sending mail.
Better, only call it once, but loop thru the email result-set and mail
via cc, or Bcc header fields.

Check the manual, it's really very helpful! :-)
http://www.php.net/manual/en/ref.mail.php
http://www.php.net/manual/en/function.mail.php

Also edit your php.ini file to reference your remote SMTP mail server.
Russ

-----Original Message-----
From: Georgie Casey [mailto:webmaster@filmfind.tv]
Sent: Monday, August 05, 2002 7:25 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Re: Mail problem


maybe use a for loop and mail command.
should work

"Unknown Sender" wrote in message
news:002701c23924$da9b1e40$539f4dd5@administrator...
Sorry to be a little bit off topic.

I need a tool or script in PHP, that will automaticaly send e-mails to
receipients taken from database.
For example 1 the same e-mail to 1000 receipients. B

Mail server is on different machine.

Thanks in advance




--=20
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Mail problem

am 11.08.2002 09:40:06 von JJ Harrison

> maybe use a for loop and mail command.
> should work

Or put all the addresses in a CC/BCC field maybe sending every 100 emails to
prevent a mail overload/blockage due to to many recipients etc.

Hint: look here: http://www.php.net/manual/en/language.variables.php and you
can find a way to append more to an existing variable. Very useful in your
case.


--
JJ Harrison
webmaster@tececo.com
www.tececo.com

> "Unknown Sender" wrote in message
> news:002701c23924$da9b1e40$539f4dd5@administrator...
> Sorry to be a little bit off topic.
>
> I need a tool or script in PHP, that will automaticaly send e-mails to
> receipients taken from database.
> For example 1 the same e-mail to 1000 receipients. B
>
> Mail server is on different machine.
>
> Thanks in advance
>
>
>



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Mail problem

am 02.10.2002 16:47:40 von Mak

Beware though...if there are too many addresses in the db, you may encounter
timeouts, or your browser may crash (very likely). Increase the timeout
before you do such a mass-mail job.

Also, my comment: If you do not want your receivers to find out who else you
sent the mail to, don't use the CC method. Just:

for(until max. users reached){
send out new mail to current user
}

Yours sincerely,
Mak

"Jj Harrison\" wrote in message
news:20020811073622.74696.qmail@pb1.pair.com...
>
> > maybe use a for loop and mail command.
> > should work
>
> Or put all the addresses in a CC/BCC field maybe sending every 100 emails
to
> prevent a mail overload/blockage due to to many recipients etc.
>
> Hint: look here: http://www.php.net/manual/en/language.variables.php and
you
> can find a way to append more to an existing variable. Very useful in your
> case.
>
>
> --
> JJ Harrison
> webmaster@tececo.com
> www.tececo.com
>
> > "Unknown Sender" wrote in message
> > news:002701c23924$da9b1e40$539f4dd5@administrator...
> > Sorry to be a little bit off topic.
> >
> > I need a tool or script in PHP, that will automaticaly send e-mails to
> > receipients taken from database.
> > For example 1 the same e-mail to 1000 receipients. B
> >
> > Mail server is on different machine.
> >
> > Thanks in advance
> >
> >
> >
>
>



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Re: Mail problem

am 03.10.2002 13:12:45 von Mark.Snijders

I also have such a script, but i use perl, but there are no difference..

use a for or while loop

and put a sleep() function or another function in the loop.. so the server
has more time to process the mail, and there will be no timeout anymore


Mark SNijders



-----Original Message-----
From: Mak [mailto:mak@a-cro.net]
Sent: woensdag 2 oktober 2002 16:48
To: php-db@lists.php.net
Subject: [PHP-DB] Re: Mail problem


Beware though...if there are too many addresses in the db, you may encounter
timeouts, or your browser may crash (very likely). Increase the timeout
before you do such a mass-mail job.

Also, my comment: If you do not want your receivers to find out who else you
sent the mail to, don't use the CC method. Just:

for(until max. users reached){
send out new mail to current user
}

Yours sincerely,
Mak

"Jj Harrison\" wrote in message
news:20020811073622.74696.qmail@pb1.pair.com...
>
> > maybe use a for loop and mail command.
> > should work
>
> Or put all the addresses in a CC/BCC field maybe sending every 100 emails
to
> prevent a mail overload/blockage due to to many recipients etc.
>
> Hint: look here: http://www.php.net/manual/en/language.variables.php and
you
> can find a way to append more to an existing variable. Very useful in your
> case.
>
>
> --
> JJ Harrison
> webmaster@tececo.com
> www.tececo.com
>
> > "Unknown Sender" wrote in message
> > news:002701c23924$da9b1e40$539f4dd5@administrator...
> > Sorry to be a little bit off topic.
> >
> > I need a tool or script in PHP, that will automaticaly send e-mails to
> > receipients taken from database.
> > For example 1 the same e-mail to 1000 receipients. B
> >
> > Mail server is on different machine.
> >
> > Thanks in advance
> >
> >
> >
>
>



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: deleting a file

am 03.10.2002 14:14:32 von Jeffrey_N_Dyke

unlink()

|-------------------------------|
| Jeff | KeaneIT - Presidents |
| Landing | Suite: 200 |
| Outside: 617 -517-1772 | |
| E-mail: jd@keane.com |
| [ Mailing: 10 Presidents |
| Landing Medford, MA 02155 USA|
| ] |
|-------------------------------|






"Karel"

> cc:
Subject: [PHP-DB] deleting a file
10/03/2002
08:16 AM
Please respond
to karel






hi how do i delete a file from server using php?

thanks

karel

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

deleting a file

am 03.10.2002 14:16:27 von Karel

hi how do i delete a file from server using php?

thanks

karel

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: deleting a file

am 03.10.2002 14:18:03 von Mark.Snijders

first try to search more on php.net


and for this time: use unlink();



-----Original Message-----
From: Karel [mailto:karel@lesk.cz]
Sent: donderdag 3 oktober 2002 14:16
To: php-db@lists.php.net
Subject: [PHP-DB] deleting a file


hi how do i delete a file from server using php?

thanks

karel

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Mail problem

am 01.08.2003 10:11:45 von Craig Roberts

It might be a good idea to set a cron job to send say, 100 at a time over
the space of a few hours, to avoild killing the mail server or the server
blocking connections from you.

Also - use the BCC field to send the mail, this means only one connection
will need to be made to the mail server per batch of addresses, as opposed
to a connection per address (saves bandwidth and mail server!). The mail
server will then send the messages where they need to go and hide all the
other recipents.

Craig Roberts


"Mak" wrote in message
news:20021002144357.27707.qmail@pb1.pair.com...
> Beware though...if there are too many addresses in the db, you may
encounter
> timeouts, or your browser may crash (very likely). Increase the timeout
> before you do such a mass-mail job.
>
> Also, my comment: If you do not want your receivers to find out who else
you
> sent the mail to, don't use the CC method. Just:
>
> for(until max. users reached){
> send out new mail to current user
> }
>
> Yours sincerely,
> Mak
>
> "Jj Harrison\" wrote in message
> news:20020811073622.74696.qmail@pb1.pair.com...
> >
> > > maybe use a for loop and mail command.
> > > should work
> >
> > Or put all the addresses in a CC/BCC field maybe sending every 100
emails
> to
> > prevent a mail overload/blockage due to to many recipients etc.
> >
> > Hint: look here: http://www.php.net/manual/en/language.variables.php and
> you
> > can find a way to append more to an existing variable. Very useful in
your
> > case.
> >
> >
> > --
> > JJ Harrison
> > webmaster@tececo.com
> > www.tececo.com
> >
> > > "Unknown Sender" wrote in message
> > > news:002701c23924$da9b1e40$539f4dd5@administrator...
> > > Sorry to be a little bit off topic.
> > >
> > > I need a tool or script in PHP, that will automaticaly send e-mails to
> > > receipients taken from database.
> > > For example 1 the same e-mail to 1000 receipients. B
> > >
> > > Mail server is on different machine.
> > >
> > > Thanks in advance
> > >
> > >
> > >
> >
> >
>
>



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Mail problem

am 24.11.2003 21:33:09 von Kim Steinhaug

Well, i've developed such a system, MarketMAX.

And ill just give you a little tip here :

1. Dont use BCC field, it look bad and your not able to populate
the emails from your database, eg. Dear %username%
Ofcourse if your bulksend the same message, always, then
BCC could spare your from headache.
2. THE TIMEOUTS!
Be aware, very aware, not only do you need to account for
php timeout, you also should be very aware of standard sendmail
configuration regarding spam. Most installations ive encountered
does not like say. 500 emails dumped at them during a few seconds.
They will probably detect you as spam, and all the mails are deleted.
The best part, all cases Ive encountered, you dont get an error so you
think everyuthing is swell -> It isnt!

What you need to do is a) create a cron job that bulk sends. eg. 50
emails each 10 second or such. My sollutions was to create a batch
system that pulls the 50 last entries from the batch list, prints out
the
html page with a 5sec meta refresh. This keeps looping till there is no
emails left.

You might be lucky to be on a system that doesnt care how many emails
sendmail spews out, but this is in fact bad. If this is happening, you
probably
will experience someone taking advantage of the system resulting in the
server IP getting blacklisted -> and this is very bad for all users.
But if you do it right, and also create a lot of "what if" scenarios, you
should
be just fine.

Happy programming!

--
Kim Steinhaug
------------------------------------------------------------ ---
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
------------------------------------------------------------ ---


"Craig Roberts" wrote in message
news:20030801081050.49373.qmail@pb1.pair.com...
> It might be a good idea to set a cron job to send say, 100 at a time over
> the space of a few hours, to avoild killing the mail server or the server
> blocking connections from you.
>
> Also - use the BCC field to send the mail, this means only one connection
> will need to be made to the mail server per batch of addresses, as opposed
> to a connection per address (saves bandwidth and mail server!). The mail
> server will then send the messages where they need to go and hide all the
> other recipents.
>
> Craig Roberts
>
>
> "Mak" wrote in message
> news:20021002144357.27707.qmail@pb1.pair.com...
> > Beware though...if there are too many addresses in the db, you may
> encounter
> > timeouts, or your browser may crash (very likely). Increase the timeout
> > before you do such a mass-mail job.
> >
> > Also, my comment: If you do not want your receivers to find out who else
> you
> > sent the mail to, don't use the CC method. Just:
> >
> > for(until max. users reached){
> > send out new mail to current user
> > }
> >
> > Yours sincerely,
> > Mak
> >
> > "Jj Harrison\" wrote in message
> > news:20020811073622.74696.qmail@pb1.pair.com...
> > >
> > > > maybe use a for loop and mail command.
> > > > should work
> > >
> > > Or put all the addresses in a CC/BCC field maybe sending every 100
> emails
> > to
> > > prevent a mail overload/blockage due to to many recipients etc.
> > >
> > > Hint: look here: http://www.php.net/manual/en/language.variables.php
and
> > you
> > > can find a way to append more to an existing variable. Very useful in
> your
> > > case.
> > >
> > >
> > > --
> > > JJ Harrison
> > > webmaster@tececo.com
> > > www.tececo.com
> > >
> > > > "Unknown Sender" wrote in message
> > > > news:002701c23924$da9b1e40$539f4dd5@administrator...
> > > > Sorry to be a little bit off topic.
> > > >
> > > > I need a tool or script in PHP, that will automaticaly send e-mails
to
> > > > receipients taken from database.
> > > > For example 1 the same e-mail to 1000 receipients. B
> > > >
> > > > Mail server is on different machine.
> > > >
> > > > Thanks in advance
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php