使用php邮件功能有限吗? [英] Is there a limit when using php mail function?

查看:109
本文介绍了使用php邮件功能有限吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用php和mysql。

I am using php and mysql.

我要发送10k ++(数万加)电子邮件来更新我的订阅者,这是我第一次去发送他们我将使用php邮件功能,基本上这是我将要做的:

I am going to send 10k++ (ten thousands plus) emails to update my subscribers, and this is the first time I am going to send them. I will use php mail function, basically here is what I will do:

首先从数据库获取数据:

First get the data from database:

Select name, email FROM data

之后,使用while循环发送数据:

After that, using while loop to send the data:

while($r = mysql_fetch_assoc($exe)){
    ...
    if($mail){
        echo "success<br>";
    } else {
        echo "failed<br>";
    }
}
echo "Sent all";

我包含if .. else语句,以确保每个电子邮件都被成功发送。有什么需要照顾的吗?发送给10K ++用户时会有任何问题吗?

I include the if.. else statement, to ensure that each email is sent successfully. Is there anything I need to take care of? Will I have any problems when SENDING TO 10K++ users?

您要发送的电子邮件数量有限吗?

Is there a limit of numbers of emails that you are going to sent?

推荐答案

请注意邮件文档


注意:值得注意的是,mail()函数不适用于更大量的电子邮件在循环中。此功能打开和关闭每个电子邮件的SMTP套接字,这不是非常有效的。

发送大量电子邮件,请参阅»PEAR :: Mail和»PEAR :: Mail_Queue包。

Note: It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient.
For the sending of large amounts of email, see the » PEAR::Mail, and » PEAR::Mail_Queue packages.

这篇关于使用php邮件功能有限吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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