简体   繁体   English

根据drupal7中的条件发送一个Email

[英]Send an Email based on the conditions in drupal7

I have a question reagarding Webforms in drupal7我有一个关于 drupal7 中的 Webforms 的问题

Scenario: I have a table in which i have different jobs with repect to locations for example if i select hyderabad locations in the dropdown than all the jobs related to hyderabad is displayed in the table,same for pune and other cities,so i have a rquirement in which if i apply on the job with location Hyderabad than email should be send to the hyderabad recruitment team and if i apply on the job with location Pune than email should send to the pune recruitment team,below are the image for better understanding so how can i achieve this?actually i created a form and link this form to the table so when i click apply now button and fill the details of the form and click send button,currently email sending both hyderabad and pune recruitment team so i want if a user select hyderabad than email should send hyderabad recr场景:我有一个表格,其中我有不同的工作,例如,如果我在下拉列表中的 select hyderabad 位置比所有与海得拉巴相关的工作都显示在表格中,对于浦那和其他城市也是如此,所以我有一个如果我申请的工作地点是海得拉巴而不是 email 应该发送给海得拉巴招聘团队,如果我申请的工作地点是浦那而不是 email 应该发送给浦那招聘团队,下面是图片以便更好地理解我怎么能做到这一点?实际上我创建了一个表格并将此表格链接到表格,所以当我点击立即申请按钮并填写表格的详细信息并点击发送按钮时,目前 email 发送海得拉巴和浦那招聘团队所以我想要如果用户 select hyderabad 比 email 应该发送 hyderabad recr uitment team same for pune,need any suggestion to achieve this because i am new in drupal7 pune 的 uitment 团队相同,需要任何建议来实现这一点,因为我是 drupal7 的新手

enter image description here在此处输入图像描述

first of all you need to create your form using drupal 7 form api if you didn't.首先,您需要使用drupal 7 form api创建表单,如果您没有。

in modulename_yourform_submit function get value of selected city from $form_state, then using if statement check the value of city and send different email with drupal mail function in modulename_yourform_submit function get value of selected city from $form_state, then using if statement check the value of city and send different email with drupal mail function

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

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