将邮件发送到 Drupal 中另一个节点中的地址
我有一个内容类型会议,其中有一个引用一个或多个人员节点的 CCK 节点引用字段。这些人员节点包含 CCK 电子邮件字段。
现在,我想在创建节点时向会议节点中列出的所有人员发送邮件。我不知道该怎么做,因为邮件地址位于不同的节点中,所以我不能只发送标记化的邮件,因为这些地址不能作为标记使用(据我所知)。
关于如何做到这一点的任何想法,最好不编写自定义模块。
编辑:
似乎没有快速简便的方法来做到这一点,所以我可能必须编写一些自定义代码来做到这一点。我已经在使用规则模块,以编程方式创建邮件操作的首选方法是什么?我是否必须从头开始创建邮件内容,或者我可以修改一些现有代码吗?
I have a content type meeting that has a CCK node referer field that refers to one or more people nodes. Those people nodes contain a CCK Email field.
Now I'd like to send a mail to all people listed in the meeting node when the node is created. I don't know how to do that as the mail adresses are in different nodes, so I can't just send a tokenized mail, as those adresses are not available as tokens (as far as I can see).
Any idea on how to do that, preferably without writing a custom module.
Edit:
There seems to be no quick and easy way do to this, so I'll probably have to write some custom code to do that. I'm already using the Rules module, what would be the preferred way to programatically create a mail action? Do I have to create the mail stuff from scratch or can I modify some existing code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来您可以结合使用规则, 视图和规则和视图集成模块来实现您的目标。
会议
关联的人员
的电子邮件地址。会议
时执行步骤 1 中创建的视图。请注意,我自己没有尝试过规则和视图集成,因此它可能无法按我的预期工作。此外,我不确定规则是否有一个电子邮件操作会将您的视图的输出作为参数。
It looks like you may be able to use a combination of the Rules, Views, and Rules and Views Integration modules to accomplish your goal.
People
associated with aMeeting
.Meeting
is created.Please note that I haven't tried Rules and Views Integration myself, so it may not work as I expect. Additionally, I am uncertain if there is an email action for Rules that will take the output of your view as a parameter.
我不确定我是否理解。通过阅读你的问题,我会回答“规则”可以为你做到这一点。但是在您的编辑中您说您使用规则模块并且想要创建邮件操作?
我可能只是累了,但请详细说明,我们会看看是否可以解决:)
I'm not sure I understand. From reading your question, I would answer "Rules" can do that for you. But then in your edit you say that you use the rules module and you want to create a mail action?
I may be just tired, but please elaborate, and we'll see if we can work it out :)