mail()函数的限制 [英] Limits for mail() function

查看:130
本文介绍了mail()函数的限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道mail()函数有多少封电子邮件?我只是想知道,因为我的本地服务器允许我通过BCC发送一封电子邮件,一封邮件作为TO发送。所以我基于这个限制的生产服务器,但我的问题是,如果允许的电子邮件的限制,哪个号码,或者这是否取决于服务器配置或PHP配置?我的服务器都是Apache。



我一直在寻找这个答案没有成功。有人知道这个答案吗?



我知道的是,除非我们有一个电子邮件列表,服务电子邮件每天限制为100个。但是PHP是否能够发送这么多的电子邮件?



还知道使用Perl扩展程序来完成此功能的批量电子邮件,但是我不知道对批量电子邮件感兴趣,只需通过内部网络向一定数量的员工发送足够的电子邮件。



例如,如果在系统中创建了一个订单,所有与这个订单联系的部门都应该收到一封电子邮件。 ex programming@company.com,production@company.com和shipping@company.com。

解决方案

PHP本身完全有能力发送数百万封电子邮件/天。脚本语言的重要性不是很重要:使用PHP,Perl或Ruby不会有太大差异,限制因素将是您的邮件服务器,也可能是网络吞吐量(不应该像您所说的那样影响您)你没有做大量的电子邮件)。直接回答您的问题 - 否 - PHP不会对发送的电子邮件数量设置限制。另外 - 服务器与emais无关,所以也不限制你。



我可以马上告诉你:如果你只能添加1到地址和1个BCC地址 - 问题会在您的MTA或电子邮件构造不正确,而不是PHP邮件()。



您的BCC是否正确?应该如下所示:

 密件抄送:user@example.com,anotheruser@example.com\rn\

 密件抄送:用户 AFAik,在Windows上,您只能这样做:

  Bcc:user@example.com,anotheruser @ example。 com 

另外 - SMTP RFC(RFC 5321)不对BCC字段长度施加任何限制, ISP可能有意限制它,以防止垃圾邮件。



pS>对于大型邮件列表,请查看以下任一项:PHPmailer,swiftmailer,Zend_Mail。 p>

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.

这篇关于mail()函数的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆