-2

In my content I have a select list text field. I have four options for that. While clicking only particular one in select list and giving click save. Then I want to generate mail to users.For example: I have select list fields like born, dead, live, none... while user selects born and goes to click save. I want to send a mail for administrator.

4
  • I don't think there is a way to do it "while user selects born and goes to click save". You can do it after the user has selected born and has clicked save.
    – No Sssweat
    Sep 8, 2015 at 7:40
  • Is your field named category and are you using taxonomy terms? OR did you just copy paste this example from somewhere?
    – No Sssweat
    Sep 8, 2015 at 7:50
  • What do you want the e-mail to say? Does it depend on what they selected?
    – No Sssweat
    Sep 8, 2015 at 7:58
  • So you just want the e-mail to say New litter was born, if they select new litter? and if they select something else, don't send anything?
    – No Sssweat
    Sep 8, 2015 at 8:16

1 Answer 1

2

(UPDATED)

go to /admin/config/workflow/rules/reaction/add

1) Name: Give the rule whatever name you want.

2) React on even: (Under Node) Select After Saving New Content

Restrict by type: select Cage Card Info

Now you're taken to a new page

3) Under Conditions, click on Add Condition.

4) In the drop down, select TEXT COMPARISON

5) Click on the Blue Link that says (DATA SELECTORS)

6) Look for your field, if you named it "warnings", then look for node:field-warnings

then highlight it, copy and paste it under Data Selector*

7) Under Matching Text put New litter

Then click SAVE

8) Under Actions, click add action

scroll all the way down, under system, select mail

9) Under TO, put [site:mail] OR [email protected] (if you don't have access to your websites e-mail inbox)

Then fill out the subject and message fields, click save.

You're done, now go and test it.

Side Note 1: I figured why the e-mail was not being set. I was trying [email protected] instead of putting [email protected] as the websites admin e-mail in /admin/config/system/site-information

"under Configuration/Site Information under "Site Details" you MUST insert an email address from your domain, and then the email works."

Side Note 2: seems like e-mails get sent after running cron. So you wont see the e-mail until cron runs. See Mail is sending after a cron run

1
  • Comments have been removed. Please don't use them for extended discussion; that is not the purpose of comments on Stack Exchange sites.
    – apaderno
    Sep 10, 2015 at 14:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.