php邮件中添加密件抄送会节省资源吗?

发布于 2024-12-19 11:13:04 字数 163 浏览 2 评论 0原文

我正在为我的自定义 CMS 编写一个管理通知系统。所以我计划向网站的所有用户添加密件抄送。这是我的问题吗?

  • 密件抄送比 foreach($user){mail()} 函数更好吗?在服务器资源使用方面?
  • 服务器支持多少个密件抄送?

谢谢。

I am writing an admin notification sytem for my custom CMS. So I am planning of adding a bcc to all the users of sites. So here are my questions?

  • Is bcc better than the foreach($user){mail()} function? in terms of server resource usage?
  • How many bcc's will the server support?

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

如此安好 2024-12-26 11:13:04

直接邮寄给用户通常是“更好”的选择,因为它允许您对其进行个性化设置。对您来说的好处是,通过将每封邮件的唯一 ID 添加到链接回您网站的每个 url,您可能有机会获得一些反馈。使用密件抄送只是一封邮件(从您的 php 服务器的角度来看),但您实际上不必担心这里的服务器资源。

密件抄送的限制似乎取决于您的提供商。我见过从 5 到 500 不等的限制。
由于 php 处理时间限制,一次发送太多邮件也可能不起作用。对于许多用户来说,您必须在这两种情况下分开发送。

A direct mail to a user is usually the 'nicer' option, as it allows you to personalize it. The advantage for you is that you may get the chance to get some feedback by adding a unique id for each mail to each url that links back to your site. Using bcc is just one mail (from the view of your php server), but you shouldn't really worry about server resources here.

Limits for bcc seem to depend on your provider. I have seen limits ranging from 5 too 500.
Sending too many mails at once may also not work due php processing time limits. For many users you will have to split the sending in both cases.

淡墨 2024-12-26 11:13:04

PHP 只是将您的请求传输到 SMTP 服务器,因此 PHP 没有任何限制。

您可以检查 SMTP 服务器限制,看看实际可以附加多少个电子邮件。

使用垃圾箱抄送并不会真正为您节省那么多资源,因为 SMTP 服务器仍然必须向所有附加的收件人发送电子邮件,也就是说 BCC 为您做的唯一事情就是隐藏发送的每封电子邮件中的电子邮件地址。

PHP is just the transporter of your request to the SMTP Server, so there is no limitations in PHP What so ever.

You can check your SMTP Servers limitations to see how many you can actually attach the the email.

using bin carbon copies will not really save you that much resources as the SMTP Server Still has to send an email to all attached recipients, this being said the only thing BCC Does for you is hide the email addresses in each email dispatched.

故人的歌 2024-12-26 11:13:04
  1. 可以说,密件抄送是隐藏的收件人。因此,如果您将收件人添加到密件抄送用户将收到您的邮件,但他们的电子邮件不会显示在“收件人”或“复制”列表中。
  2. BCC 收件人的最大数量取决于邮件服务器。
  1. BCC is, lets say, hidden recipients. So if you'll add recipients to BCC users will receive your message, but their emails will not be displayed in "to" or "copy" list.
  2. Max count of BCC recipients depends on mail server.
长梦不多时 2024-12-26 11:13:04

好吧,只有当您发送完全相同的消息且其中不包含个人/个人信息时,这才有效,就像所有人都会收到相同的消息一样:

你好,世界

,而不是

亲爱的 XY 先生

亲爱的 AB 女士

Well, this only works if you send the exactly same message with no personal/individual information in it, like all would receive this same message:

hello world

and not

Dear Mr. XY

or

Dear Ms. AB

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文