1. many providers will not accept email messages with horrendous amounts of BCC: entries (very spam indicative)
Say we limit the BCC list to a hundred email addresesses. And use cron jobs to send the emails out every hour -- would that be ok?
What would you consider excessive, say we limit each email list to about 1k subscribers, do you think your average hosting company will have a problem with that ?
3. there are many excellent PHP mail classes (PHPClasses has a few and PHPMailer is an excellent alternative as well)Thanks a lot. Looking at them now.
4. IM(H)O, if you are going to send out large amounts of mail, dump sendmail. QMail is much faster at SMTP.
Ok.
Factors you may need to consider:The messages will be individualized. Hence we would need to send out individual emails. Its possible that the BCC way also will not work, because we would need to process each email individually before sending them out.
If this is a newsletter, why not use something like ezmlm or majordomo? Are these individualized messages (custom inserts for names or email addresses, custom unsubscribes, etc.)?
What would be the best way to handle this ?
Many other programmers will mention things like having a dedicated outbound-I can get a dedicated SMTP machine. That should be ok.
SMTP machine, while fending the bounces and unsubscribes on another, hardware types (SCSI over IDE), etc. Make sure you have thought your application needs through before beginning programming.
Thanks for your input mate.
Mohan
Quoting Mohanaraj <[EMAIL PROTECTED]>:
Dear all,
I have read that using mail() in a for loop to send a lot of emails ( around 1k-10k ) emails is not advised due to the fact that it can be resource intensive hence or the script might take so much time that it ti,es out. However what if i append all the emails into the Bcc: header as follows and make only 1 call to mail.
1. Is this better? 2.Will it still be resource hungry? 3.What would be the best way to handle mailing to many email addresses from PHP. This is for a newsletter (not SPAM) application I am working on. 4.How does this compare against using sockets to directly speak to the SMTP server from a efficiency aspect?
The code I am planning on using (which I got online too ) is as follows :
$email = "[EMAIL PROTECTED]"; $subject = "test";
$body = "This is a test.";
$headers = "From: [EMAIL PROTECTED]"; $headers .= "Reply-to: [EMAIL PROTECTED]";
//the following willl have all the email addresses which will receive the email
$headers .= "Bcc: [EMAIL PROTECTED]"; $headers .= "Bcc: [EMAIL PROTECTED]"; $headers .= "Bcc: [EMAIL PROTECTED]"; $headers .= "Bcc: [EMAIL PROTECTED]"; $headers .= "Bcc: [EMAIL PROTECTED]"; //..and so on...
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
mail ($email, $subject, $body, $headers);
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
======================================= Michael Geier CDM Sports, Inc. Systems Administration email: [EMAIL PROTECTED] phone: 314.692.3540
----------------------------------------------- This email sent using CDM Sports Webmail v3.1 [ http://webmail.cdmsports.com ]
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php