金字塔发送邮件:pyramid_mailer 或 marrow.mail

发布于 2024-11-19 13:31:46 字数 844 浏览 2 评论 0原文

我有兴趣向基于 Pyramid 的网络应用添加传出电子邮件支持。我知道 Pyramid_mailer 和 marrow.mail(以前称为 TurboMail),其中包含金字塔集成示例此处

一个类似的问题,但它并没有完全给我经验丰富的意见寻找。

我对两者都没有经验,但两者看起来都做得相当不错。我的需求不大,而且流量非常低……如果它们发生冲突,易用性将胜过性能。两者都有适合我的传输支持(我不需要任何花哨的交付功能)。

乍一看,我喜欢pyramid_mailer支持repoze.tm2事务挂钩,这对我的项目来说很方便(我确信我可以侵入marrow.mailer来做同样的事情,但我如果没有充分的理由,我宁愿不做这项工作)。而且我还喜欢 marrow.mailer 中的 Message() 正文支持嵌入图像(导致可能的结论是后者更完整)。

我正在寻找意见、建议,也许还有示例集成代码。

我发现涵盖此内容的邮件列表讨论 也。

I'm interested in adding outgoing email support to a Pyramid-based web-app. I'm aware of pyramid_mailer and marrow.mail (formerly known as TurboMail), with pyramid-integration example here.

There is a similar SO question, but it doesn't quite give me the experienced opinion I am looking for.

I have no experience with either, but both seem pretty reasonably well-cooked. My needs are modest, and will be very low traffic... ease of use would trump performance should they be in conflict. Both have transport support that will work for me (I don't need any fancy delivery features).

On first glance, I like that pyramid_mailer supports the repoze.tm2 transaction hook, which would be handy for my project (I'm sure I could hack-in marrow.mailer to do the same, but I'd rather not do that work without good reason). And also I like that embedded images are supported on the Message() body in marrow.mailer (leading to a possible conclusion that the latter is more fully formed).

I'm looking for opinions, recommendations, and maybe example-integration code.

I found a mailing-list discussion that covers this too.

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

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

发布评论

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

评论(1

嘦怹 2024-11-26 13:31:46

经验丰富的答案是,如果您只想通过 SMTP 服务器发送电子邮件,pyramid_mailer 更容易配置和执行。 Message 类来自 Lamson,它经过验证、稳定、经过测试,并且支持您可能想要在电子邮件中发送的任何内容,包括附件和 html。邮件程序还支持将所有消息简单地转储到队列目录,稍后您可以在其中运行 bin/qp /path/to/queue/dir 来异步发送电子邮件。

故事的另一面是 Turbomail 已经存在了一段时间,它现在更名为 marrow.mailer 并且支持大量后端,而不仅仅是 SMTP。 Alice 一直在积极致力于添加事务支持以与 repoze.tm2 集成,因此肯定有兴趣使 marrow.mailer 成为更具吸引力的解决方案。

The experienced answer is that if you just want to send email through a SMTP server, pyramid_mailer is way easier to configure and execute. The Message class is from Lamson, which is tried and true, stable, tested and supports whatever you might want to send in an email including attachments and html. The mailer also supports simply dumping all of the messages to a queue directory, where later you can just run bin/qp /path/to/queue/dir to send out the emails asynchronously.

The other side of the story is that Turbomail has been around for a while, it's now renamed to marrow.mailer and supports a ton of backends, not just SMTP. Alice has been actively working on adding the transaction support to integrate with repoze.tm2, so there is definitely interest in making marrow.mailer a more attractive solution.

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