共享主机邮件限制解决方法
所以我在付费共享主机上有几个网站,我的主机将邮件限制为每小时 300 封。 我的网站之一拥有超过 500 名订阅者。
我的问题是如何将新闻通讯发送给我的所有订阅者?有没有一种方法或脚本可以用来向前 300 个用户发送电子邮件,并在一小时后发送其余的...?
我还考虑过创建一个 Gmail 帐户以通过 smtp 发送新闻通讯。你们知道免费gmail smtp的限制吗?
so i have a couple of sites on paid shared hosting, my host limits the mail to 300 per hour.
One of my sites has more than 500 subscribers.
My question is how can i send the newsletter to all my subscribers? is there a way or a script that i can use to send the first 300 users the email and after an hour to send the rest...?
i've also considered making a gmail account to send the newsletters via smtp. Do you guys know the limit of free gmail smtp?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您不应该规避主机设置的限制。我建议您调整发送速度,并记录您上次发送的 ID,并在下一小时内从那里接收。或者,您可以在发送之间留出足够的睡眠时间,以使整个事件以大约 300/小时的速率进行。
You shouldn't circumvent the restrictions placed by your host. I would suggest you pace your sends, and record your last-sent-id, picking up from there in your next hour. That, or you can place sufficiently sleep-time between sends to allow the entire thing to go out at a rate of about 300/hr.
谢谢你们所有的回复...这确实帮助我找到了解决这种不便的方法。我个人买不起 VPS 托管,也无法为外部邮件服务器支付额外费用...
考虑到 Jonathan Solution 和 William 的评论,我最终开发了一个基于 XML 的小型 php 应用程序,将不同批次发送给 250 个收件人,每个收件人的差距为65分钟。
因此,它的工作方式是,默认情况下,它仅允许单击第一批链接并将新闻通讯发送给第一批用户,并在 XML 文件中记录发送的确切时间。
然后,使用 XML 文件信息,下一个链接会注册发送之前的批次,并以 XML 上的时间作为参考开始 65 分钟倒计时。
因此,脚本不会运行几个小时,并且浏览器可以安全关闭,因为所需的所有信息都在 XML 文件中。
这听起来可能很简单,但却是一个复杂而高效的应用程序,它动态适应增长(新订阅者),因为它使用 sql LIMIT 子句查询数据库上的主表来进行不同的批次。所以不需要维护。
如果有人对源代码感兴趣,请随时与我联系@ [email protected]
Thank You for all your Reply guys... it really helped me find a solution for this inconvenience. I personally can't afford VPS hosting nor pay extra for an external for a mail server...
Considering Jonathan Solution and William's Comments i ended up developing a small php application based on XML to send different batch to 250 recipients each with a GAP of 65 minutes.
So the way it works, by default it only enables the first batch link to be clicked and send the newsletters to the first batch of users and recording the exact time this was sent in a XML file.
Then using the XML file info the next link registers that the batch before it was sent and starts a count down of 65 minutes with the time on the XML as reference.
So a Script will not be running for hours and the browser could be safely close since all the info required is in the XML file.
This may sound Simple but is a complex and efficient app that dynamically adapts to growth (new subscribers) as it queries the master Table on a database using the sql LIMIT clause to make the different batches. So it doesn't required maintenance.
If anyone is interested on the source code feel free to contact me @ [email protected]
Google Mail 确实有限制,请参阅:
要解决此问题,您可以在数据库中创建一个队列表,其中包含您要向其发送新闻通讯的所有用户的列表。然后批量发送电子邮件(例如 500 封)。发送电子邮件后,将其从队列表中删除。您可以使用 cron(如果在 Linux 上且主机允许的话)每小时运行一个 PHP 脚本,根据队列发送电子邮件。
Google Mail does have limits, see:
To get around the problem, you could create a queue table in your db with a list of all the users you're sending the newsletter to. Then send e-mails out in bulks (500 example). Remove the e-mails from the queue table as they're sent out. You could use a cron (if on linux and host allows) to run a PHP script every hour that sends e-mails based off the queue.
我想找一个地方来停放您的 MX(不确定 Google 的限制,但这可能是一个开始)。邮件列表管理员将邮件排队以适应发送限制是很常见的。即,一个 cron 作业查询数据库,选取 250 封要发送的电子邮件并将其发送出去。
当您有 10,000 个订阅者并且需要从同一 MX 发送非自动电子邮件时,就会出现问题。也就是说,如果您的限制被用于发送时事通讯,那么您回复自己的电子邮件的能力会发生什么变化?
许多公司仅提供 MX 托管,我会选择其中一家,并将发送列表的整个业务移至那里。或者,给自己买一个 VPS(每月价格大致相同)。
I'd seek a place just to park your MX (not sure of Google's limits, but that could be a start). Its very common for mailing list managers to queue mails to fit within sending limits. I.e. a cron job queries a database, picks up 250 emails to send and sends them out.
The problem lies when you have 10,000 subscribers and need to send non-automated emails from the same MX. I.e., if your limit is consumed getting out a newsletter, what happens to your ability to reply to your own e-mail?
A lot of companies offer MX only hosting, I'd go with one of them and move the whole business of sending the list over there. Or, just get yourself a VPS (its going to be about the same monthly price).