[PHP-DB] mail problem
hi i made a simple script to send e-mail to my mailing list it reads the e-mails from a text file and send it to them the problem that i want to send them once, not one by one which takes a lot of time cause i have a limited quota per day here is the script can't Read emails." ."Please try again later."; exit; } while (!feof($fp)) { $mail= fgets($fp, 200); mail($mail,$subject,$sendmessage,"From: $from"); echo $mail.""; } fclose($fp); ?> can anyone help and can i use a smtp server instead? and if yes please tell me how, waiting for a reply thanks for your time
Re: [PHP-DB] Mail problem
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: [PHP-DB] Mail problem
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:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 2:47 PM To: [EMAIL PROTECTED]; Russ Subject: Re: [PHP-DB] Mail problem 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" <[EMAIL PROTECTED]> To: "Bartek Pawlik" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 2:30 PM To: [EMAIL PROTECTED] 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: [PHP-DB] Mail problem
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" <[EMAIL PROTECTED]> To: "Bartek Pawlik" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 2:30 PM To: [EMAIL PROTECTED] 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: [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:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 2:30 PM To: [EMAIL PROTECTED] 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-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-DB] mail problem with ... Unbalanced '<'
Hi, sorry if this is slightly off topic but I thought someone might have some idea of the problem. I am using the mail function like so; mail( $to, $subject, $this->mime ); where the arguments have the following values; print '$to = '.$to."\n"; print '$subject = '.$subject."\n; print '$this->mime = '.$this->mime."\n"; $to = "Tom Hodder" <[EMAIL PROTECTED]> $subject = htrheht $this->mime = This is a MIME encoded message. --=_ab31b28377a78eb2ae3ca4c36b9262ec Content-Type: text/plain Content-Transfer-Encoding: base64 RW50ZXIgeW91ciBQTEFJTiBURVhUIG5ld3NsZXR0ZXIgaGVyZS5FbnRlciB5b3VyIFBMQUlOIFRF WFQgbmV3c2xldHRlciBoZXJlLkVudGVyIHlvdXIgUExBSU4gVEVYVCBuZXdzbGV0dGVyIGhlcmUu RW50ZXIgeW91ciBQTEFJTiBURVhUIG5ld3NsZXR0ZXIgaGVyZS5FbnRlciB5b3VyIFBMQUlOIFRF WFQgbmV3c2xldHRlciBoZXJlLkVudGVyIHlvdXIgUExBSU4gVEVYVCBuZXdzbGV0dGVyIGhlcmUu DQoNCg0KDQpFbnRlciB5b3VyIFBMQUlOIFRFWFQgbmV3c2xldHRlciBoZXJlLkVudGVyIHlvdXIg UExBSU4gVEVYVCBuZXdzbGV0dGVyIGhlcmUuRW50ZXIgeW91ciBQTEFJTiBURVhUIG5ld3NsZXR0 ZXIgaGVyZS5FbnRlciB5b3VyIFBMQUlOIFRFWFQgbmV3c2xldHRlciBoZXJlLkVudGVyIHlvdXIg UExBSU4gVEVYVCBuZXdzbGV0dGVyIGhlcmUuDQoNCg0KRW50ZXIgeW91ciBQTEFJTiBURVhUIG5l d3NsZXR0ZXIgaGVyZS5FbnRlciB5b3VyIFBMQUlOIFRFWFQgbmV3c2xldHRlciBoZXJlLkVudGVy IHlvdXIgUExBSU4gVEVYVCBuZXdzbGV0dGVyIGhlcmUuRW50ZXIgeW91ciBQTEFJTiBURVhUIG5l d3NsZXR0ZXIgaGVyZS4= --=_ab31b28377a78eb2ae3ca4c36b9262ec-- this generates a return email with the following contents... The original message was received at Sun, 05 Aug 2001 19:48:50 +0100 - The following addresses had permanent fatal errors - <"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> - Transcript of session follows - ... while talking to mail.globalgold.co.uk >>> RCPT To:<"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> <<< 553 <"[EMAIL PROTECTED]" <[EMAIL PROTECTED]>... Unbalanced '<' I would be grateful if anyone could shed some light on this problem.. Cheers Tom Hodder -- PHP Database 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]