Rails 邮件合并功能
我有一个场景,我需要允许用户向多个收件人发送消息,但用户也可以使用文本编辑器为每个用户自定义消息。现在我知道动作邮件程序允许多个收件人,但我想知道我应该如何处理每个用户的自定义消息,然后将它们发送出去。
是否有任何插件或宝石可用于帮助支持此功能...或者还有什么解决方案???请建议...
I have a scenario in which i'm required to allow the user to send a message to multiple recipients but the user can also customize the message for each user by using a text editor. Now i know action-mailer allow multiple recipients but i'm wondering how am i supposed to handle the customized messages for each user and then sending them over.?
Are there any plugins or gems available to help support this functionality...or what else could be the solution for this??? please suggest...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您必须一封一封地发送电子邮件 - 当向多个收件人发送一封电子邮件时,您无法自定义每个收件人的内容。这就是电子邮件的工作原理。
相反,您应该做的是将自定义存储在某处,当触发电子邮件发送时,您循环浏览收件人列表,检查是否有适合他/她的自定义,相应地构建电子邮件并将其发送出去。
You have to send the emails one by one - you cannot customize the contents per receiver when sending out one single email to several receivers. This is how email works.
Instead what you should do is to store the customizations somewhere, and when the email sending is triggered, you cycle through the list of receivers, check if there are any customizations for him/her, build the email accordingly and send it out.
要一一发给他们吗?
how about send to them one by one?
一定有像密件抄送这样的东西,通常可以通过密件抄送的帮助来完成,但在我看来,除此之外别无他法。
there must be something like bcc which is available generally it can be done by the help of bcc however there is no way except that in my opinion.