测试邮件列表软件的最佳方法是什么?

发布于 2024-07-10 02:48:10 字数 161 浏览 12 评论 0原文

我最近用 Ruby On Rails 编写了邮件列表软件。 我想获得一些关于测试它的最佳方法的专家建议。 例如,如果我可以编写一个脚本来生成 10,000 个电子邮件地址,使用该软件向这 10,000 个地址发送电子邮件,然后编写一个脚本来确保电子邮件能够通过,那就太酷了。 我不确定这有多容易/可能。

I recently wrote mailing list software in Ruby On Rails. I would like to get some expert advice on the best way to test it. For example, it would be cool if I could write a script generate 10,000 email addresses, use the software to send an email to those 10,000 addresses, and then write a script to make sure the emails got through. I am not sure how easy/possible this is.

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

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

发布评论

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

评论(3

水波映月 2024-07-17 02:48:11

只要您拥有所有 10,000 个电子邮件地址,您就可以做到这一点。

简单的解决方案是设置一个具有“包罗万象”电子邮件地址的电子邮件服务,即接收所有传入电子邮件到同一域的电子邮件服务,但该地址不包含该地址。存在。 然后,您可以为收件人地址生成随机的废话,但都在同一域中,并且在发送这些地址后,您可以从包罗万象的帐户中收集所有这些地址,删除预期收件人电子邮件地址的列表,并将其与生成的收件人列表

最好是在您自己的电子邮件服务器/系统上执行此操作,以避免被列为垃圾邮件发送者黑名单!

as long as you own all 10,000 email addresses, you can do it

the simple solution is to set up an email service with a 'catch-all' email address, i.e. one that receives all incoming email to the same domain where the address does not exist. Then you can generate random nonsense for the recipient addresses but all on the same domain, and after they're sent you can collect them all from the catch-all account, strip out the list of intended recipient email addresses, and compare that to the list of generated recipients

it would be best if you did this on your own email server/system, though, to avoid getting blacklisted as a spammer!

-小熊_ 2024-07-17 02:48:11

我想您的机器学习管理器有一个命令界面,是网络界面还是邮件界面(或者希望两者都有)? 您还需要测试这些。 Web UI 测试起来有点困难,但邮件 UI 应该非常简单。 如果我要编写这样的 ML 管理器,我可能会添加 XML-RPC/SOAP Web 服务来访问管理功能。 如果您的 ML 管理器也支持按域(所有 *@aol.com 等)对邮件进行分组,那么最好也对此进行测试。 在这种情况下,TDD 方法会很好地遵循。 MLM 中的许多功能都可以通过单元测试进行测试。

I suppose your ML manager has a command interface, being either a web one or a mail one (or hopefully both)? You need to test these as well. Web UI is a bit more difficult to test but the mail one should be pretty simple. If I were to write such a ML manager, I'd probably add a XML-RPC/SOAP webservice to access admin functions. If your ML manager also support, grouping of mail by domain (all *@aol.com, and so on), it would be good to test this as well. In such matters, TDD approach would be nice to follow. Many functions in a MLM can be tested with unit tests.

友谊不毕业 2024-07-17 02:48:10

如果您碰巧在运行 Postfix MTA 的系统上有一个电子邮件地址,那么您就可以使用任意大量的电子邮件地址。 例如,我的常规电子邮件地址是 [email protected],但邮件已发送到 [email protected] 将根据 ~nr/ 的内容转发.转发+xxx。 当我需要收集 120 个不同的电子邮件地址时,我使用过此工具,因为我充当可信的第三方,在一群其他人之间进行匿名通信。

在 Postfix 的默认配置中,手册说

name+foo 的邮件将传送到别名 name+foo 或别名、〜name/.forward+foo 或 ~name/.forward 中列出的目的地、用户名拥有的邮箱,或者因无法送达而被退回。

If you happen to have an email address on a system run with the Postfix MTA, you have an arbitrarily large supply of email addresses at your disposal. For example, my regular email address is [email protected], but mail sent to [email protected] will get forwarded according to the contents of ~nr/.forward+xxx. I used this facility once when I need a collection of 120 distinct email addresses because I was acting as a trusted third party for anonymous communication between a bunch of other people.

In the default configuration for Postfix, the manual says

mail for name+foo is delivered to the alias name+foo or to the alias name, to the destinations listed in ~name/.forward+foo or in ~name/.forward, to the mailbox owned by the user name, or it is sent back as undeliverable.

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