array ( 'rules' => array ( 'rules_1' => array ( '#type' => 'rule', '#set' => 'event_node_insert', '#label' => 'Mail on answer', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'answers', ), '#status' => 'custom', '#conditions' => array ( 0 => array ( '#weight' => 0, '#info' => array ( 'label' => 'Created content is Answer', 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'module' => 'Node', ), '#name' => 'rules_condition_content_is_type', '#settings' => array ( 'type' => array ( 'answer' => 'answer', ), '#argument map' => array ( 'node' => 'node', ), ), '#type' => 'condition', ), ), '#actions' => array ( 0 => array ( '#type' => 'action', '#settings' => array ( 'field' => 'field_answer_question', '#argument map' => array ( 'node' => 'node', 'referenced_node' => 'referenced_question', ), ), '#name' => 'nodereference_rules_action_load', '#info' => array ( 'label' => 'Load a referenced node', 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content containing the node reference field', ), ), 'new variables' => array ( 'referenced_question' => array ( 'label' => 'referenced question', 'label callback' => false, 'type' => 'node', ), ), 'module' => 'CCK', ), '#weight' => -5, ), 1 => array ( '#weight' => 0, '#info' => array ( 'label' => 'Load the referenced question author', 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'new variables' => array ( 'question_author' => array ( 'label' => 'question author', 'label callback' => false, 'type' => 'user', ), ), 'module' => 'Node', ), '#name' => 'rules_action_node_load_author', '#settings' => array ( '#argument map' => array ( 'node' => 'referenced_question', 'author' => 'question_author', ), ), '#type' => 'action', ), 3 => array ( '#type' => 'action', '#settings' => array ( 'severity' => '5', 'type' => 'rules', 'message' => 'Email has been sent to [referenced_question:author-name-raw]', 'link' => '', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'message' => array ( 0 => 'referenced_question', ), ), ), ), '#name' => 'rules_action_watchdog', '#info' => array ( 'label' => 'Log to watchdog', 'module' => 'System', 'eval input' => array ( 0 => 'type', 1 => 'message', 2 => 'link', ), ), '#weight' => 0, ), 2 => array ( '#type' => 'action', '#settings' => array ( 'from' => '', 'subject' => 'You have received an Answer', 'message' => 'Hello [question_author:user], You have received an answer to the question you posted on the TES New Teachers website: [referenced_question:field_answer_question-title] To read the answers follow this link: [referenced_question:field_answer_question-link] If you no longer want to receive these alerts, follow these instructions to turn them off: Click on the link above Sign in to the website and then click on the Edit tab Uncheck the Notify me of answers and click the Save button. PS: You can turn your messages back on at any time. Best wishes TES New Teachers team', '#argument map' => array ( 'user' => 'question_author', ), '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'message' => array ( 0 => 'question_author', 1 => 'referenced_question', ), ), ), ), '#name' => 'rules_action_mail_to_user', '#info' => array ( 'label' => 'Send a mail to a user', 'arguments' => array ( 'user' => array ( 'type' => 'user', 'label' => 'Recipient', ), ), 'module' => 'System', 'eval input' => array ( 0 => 'subject', 1 => 'message', 2 => 'from', ), ), '#weight' => 5, ), ), '#version' => 6003, ), ), )