将邮件发送到 Drupal 中另一个节点中的地址

发布于 2024-09-16 19:54:10 字数 342 浏览 6 评论 0原文

我有一个内容类型会议,其中有一个引用一个或多个人员节点的 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 技术交流群。

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

发布评论

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

评论(2

烙印 2024-09-23 19:54:10

看来您可以结合使用规则视图规则和视图集成模块来实现您的目标。

  1. 创建一个视图,返回与会议关联的人员的电子邮件地址。
  2. 配置视图以将其结果“呈现”到将电子邮件发送到结果地址的规则中。
  3. 创建一个规则,用于在创建会议时执行步骤 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.

  1. Create a view that returns the email address of People associated with a Meeting.
  2. Configure the view to "render" its results into a rule that sends emails to the resulting addresses.
  3. Create a rule that executes the view created in step 1 when a 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.

从﹋此江山别 2024-09-23 19:54:10

我不确定我是否理解。通过阅读你的问题,我会回答“规则”可以为你做到这一点。但是在您的编辑中您说您使用规则模块并且想要创建邮件操作?

我可能只是累了,但请详细说明,我们会看看是否可以解决:)

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 :)

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