如何在php中无限制地发送数千封电子邮件? [英] How can I send thousands of emails without limits in php?

查看:314
本文介绍了如何在php中无限制地发送数千封电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,每天早晨发送新闻稿.
但这不是常规新闻,每封电子邮件都有不同的内容,具体取决于用户帐户.

现在,我使用一个名为PHPMailer的类,它可以很好地工作,可以满足我的需要.但是,为此,我使用一个Gmail帐户进行身份验证.问题是,与其他电子邮件服务一样,Gmail也有其send-daily-limits.
实际上,它只发送前2000封电子邮件.

我该如何克服这个问题?我的服务是免费的,我没有钱支付任何额外的服务,我只有(专用)服务器.
(ubuntu 12.04,灯组)

在此先感谢您,我的英语太糟糕了.

I have a website that every morning sends a newsletter.
But it's not a regular newsletter, every email has different content depending on the user account.

Now I use a class called PHPMailer and it work pretty well, it does what I need. But to do that, i authenticate with a Gmail account. Problem is, Gmail, just like any other email service, has its send-daily-limits.
In facts, it just sends the first 2000 emails.

How can I overcome this problem? My service is free and I don't have money to pay any extra service, I only have my (dedicated) server.
(ubuntu 12.04, lamp stack)

Thanks in advance, and sorry for my awful english.

推荐答案

如果您运行自己的服务器并发送合法电子邮件,则可以发送多少电子邮件没有实际限制.您无需支付每条消息的费用,现在几乎所有垃圾邮件过滤都是由用户对邮件的处理方式完成的-因此,如果他们的行为像您在发送自己想要的内容(即,他们阅读并没有对其进行标记)作为垃圾邮件),您将不会遇到任何可传递性问题.

If you run your own server and send legitimate emails, there is no practical limit to how many emails you can send. You're not paying per-message fees, and almost all spam filtering is now done by what the users do with their messages - so if they act like you're sending stuff they want (i.e. they read it and don't mark it as spam), you will have no deliverabilty issues.

没有什么可说的是,发送大量电子邮件的服务器必然会被列入黑名单,尽管如果新服务器突然开始发送大量消息通常被认为是可疑的,所以最好将其缓慢启动,并且/或将您的发送分散到多个IP.

There's nothing to say that a server sending high volumes of email will necessarily get blacklisted, though it is often regarded as suspicious if a new server suddenly starts sending lots of messages, so it's a good idea to ramp it up slowly, and/or spread your sending across multiple IPs.

我有一些自建站点,这些站点使用PHPMailer发送大量邮件(有时每天每天发送数百万个邮件),但是您可能无法配置现成的服务器来做到这一点. PHP相当有能力每秒发送数百条消息,这主要取决于您的模板系统.

I have self-built sites that send high volumes using PHPMailer - sometimes millions per day each - but you may have trouble configuring an off-the-shelf server to do that. PHP is quite capable of sending several hundred messages per second, mostly depending on your templating system.

尽管如此,您确实必须对配置完全偏执:

You do have to be completely paranoid about your config though:

  • 设置严格的SPF
  • 使用DKIM签名
  • 配置DMARC
  • 您不能将密件抄送用于个性化消息
  • 不发送附件
  • 将消息保持较小,链接到更大的内容
  • 确保您的邮件服务器DNS记录能同时解决这两种情况
  • 请确保您具有良好的弹跳处理能力(PHP难以理解)
  • 使用VERP寻址(有助于退回处理)
  • 监视您的邮件服务器队列
  • 立即处理所有退订,垃圾邮件报告或黑名单
  • 始终始终对新订阅使用双重加入
  • 从不使用购买列表
  • Set up strict SPF
  • Sign with DKIM
  • Configure DMARC
  • You can't use BCC for personalised messages
  • Don't send attachments
  • Keep messages small, link to bigger content
  • Make sure your mail server DNS records resolve both ways
  • Make sure you have good bounce handling (difficult in PHP)
  • Use VERP addressing (helps bounce handling)
  • Monitor your mail server queues
  • Deal with any unsubscribes, spam reports or blacklisting immediately
  • Always, always use double-opt-in for new subscriptions
  • Never use bought-in lists

从本质上讲,所有这些东西都是您在使用ESP时所要支付的,尽管它们经常会尝试告诉您,但是没有什么可以阻止您自己完成所有工作-俗话说,免费有这么长时间因为你的时间没有价值!

All this stuff is essentially what you're paying for when you use an ESP, and though they will often try to tell you otherwise, there's nothing stopping you from doing it all yourself - as the saying goes, it's free so long as your time has no value!

正如其他人提到的那样,RSS或通知可以使您减少需要通过电子邮件发送的数量.

As others have mentioned, RSS or notifications may allow you to reduce the amount you need to send via email.

这篇关于如何在php中无限制地发送数千封电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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