生成 Rails 应用程序中所有电子邮件的示例版本

发布于 2024-10-10 00:49:35 字数 111 浏览 0 评论 0原文

为 Rails 应用程序生成的每封电子邮件生成示例/测试版本的最佳方法是什么(例如,以便其他人可以查看它们以进行内容更改)?如果默认情况下没有简单的方法,是否有任何宝石或简单的代码更改可以促进将来执行此操作?

What is the best way to generate a sample/test version of every email that can be produced by a Rails application (for example, so that someone else can look them over to make content changes)? If there isn't an easy way by default, are there any gems or easy code changes that would facilitate doing this in the future?

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

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

发布评论

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

评论(1

我是有多爱你 2024-10-17 00:49:35

没有简单的方法或宝石可以做到这一点。原因是电子邮件可以通过多种不同的方式实现。我的建议是将电子邮件模板文件保存在单独的位置 - 以便轻松检索它们并将其发送给某人,或者使用外部 API 发送电子邮件,例如 MadMimi,允许您将电子邮件模板保存在单独的网站上。

There isn't an easy way or a gem that does this. The reason is that emails can be implemented in a variety of different ways. My recommendation would be to either keep your email template files in a separate location - so that they are easy to retrieve and send to someone, or to use an external API for sending your emails, such as MadMimi, that allows you to keep your email templates on a separate website.

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