Does anybody know how many emails are limited in the mail() function? I just wonder, because my localhost server allow me to send just one email through BCC and one email as TO. So I based the production server with this limitations, but my question is, if there's a limit of emails allowed, which number it is, or if this depends on server configurations or PHP configuration? Both my servers are Apache.
I've been looking for this answers without success. Does anybody know this answer?
What I know is unless we have an email list services emails are limited to 100 per day. But is PHP capable to send this amount of emails?
Also know that's better to use the Perl extension to this function for bulk email, but by my end I'm not interested in bulk emails, just the ability to send enough emails through the internal network to a certain amount of employees.
For example, if an order is created in the system then all the departments that will have contact with this order should receive an email. ex programming@company.com, production@company.com and shipping@company.com.
PHP itself is perfectly capable of sending millions of emails/day. scripting language is of not much importance: there shouldn't be much difference either you are using PHP, Perl or Ruby, the limiting factor will be your mail server and perhaps network throughput (shouldn't affect you that much as you're saying you're not doing mass emailing). Answering your question directly - no - PHP doesn't not set a limit on amount of emails you can send. Also - server has nothing to do with emais, - so that doesn't limit you either.
I can tell you right away: if you can only add 1 To address and 1 BCC address - problem would be either in your MTA or email constructed incorrectly, not in PHP mail().
Is your BCC correct?, should look like this:
Bcc: user@example.com, anotheruser@example.com\r\n
or
Bcc: User <user@example.com>, Another User <anotheruser@example.com>\r\n
AFAik, on windows you can only do that:
Bcc: user@example.com, anotheruser@example.com
Also - SMTP RFC (RFC 5321) does not impose any limit on BCC field length, though some ISP may limit it intentionally to prevent spamming.
p.S> For large mailing lists - look at either: PHPmailer, swiftmailer, Zend_Mail.
PHP imposes no arbitrary limits. If you're trying to send one email with 1000 addresses in a single BCC header, you'll run into issues with your mail server before you run into issues with PHP. The simple alternative is to send 1000 emails each with one recipient.
BCC and CC are passed in the headers.
This means they are passed in text form and your SMTP server tries to make the most out of it.
So I think the only limit, is that of your SMTP server