使用php邮件功能有限制吗?

编程入门 行业动态 更新时间:2024-10-27 01:22:58
本文介绍了使用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邮件功能有限制吗?

本文发布于:2023-10-17 11:07:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1500713.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:邮件   功能   php

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!