简体   繁体   English

Drupal 7:Webform:有条件地发送电子邮件吗?

[英]Drupal 7: Webform: Send Emails Conditionally?

Is there any way to put a condition for sending emails? 有什么方法可以发送电子邮件吗?

For example: on my webform, I want to send email out only when current user = 'xyz' ? 例如:在我的Web表单上,我只想在当前用户='xyz'时才发送电子邮件?

I searched a lot but could not find a way to send email conditionally.. 我进行了很多搜索,但找不到有条件地发送电子邮件的方法。

Webform Rules is what you are looking for. Webform Rules是您要寻找的。

Other option is to do it programatically. 另一种选择是以编程方式进行。 Check the second answer here . 这里检查第二个答案。

EDIT: 编辑:

Event: 事件:

  1. After a webform has been submitted 提交网络表单后

Condition: 条件:

  1. Select data comparison 选择数据比较
  2. Click on the field, a dropdown will appear 点击该字段,将显示一个下拉列表
  3. Select Use:...(User, who submitted the webform) 选择使用:...(提交网络表单的用户)
  4. This will open up a new dropdown. 这将打开一个新的下拉列表。 Select the data you want to match. 选择您要匹配的数据。 In your case, it will be user:name 在您的情况下,它将是user:name
  5. Click continue. 单击继续。 Configure "equals", "Data value" = XYZ. 组态“等于”,“数据值” = XYZ。

Action: 行动:

  1. Send Email. 发电子邮件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM