Drupal 6.5
rules-6.x-1.0-beta3
token-6.x-1.x-dev

Hello.

I have succesfully installed the module Rule.
I created a rule to send me an E-Mail every Friday between 2:00 and 2:59 (whenever cron is actioned in this time slot, which it is normaly once).

Now I want to customize this Mail, but I do not know where to start. I installed Token module but I dont know how to use it.

What I want is to put the three newest nodes in the Mail, maybe filtered by taxonomy. I could create a view for what I like to send, but how do I get the results of the View in the Mail?

I hope I could clarify what I want: It is kinda automatic weekly newsletter including the newest nodes on the page (maybe with comments, or just the newest nodes from a special taxonomy term).

I would be thankful for any hint in the right direction.

Here is my exported rule:

array (
  'rules' => 
  array (
    'rules_1' => 
    array (
      '#type' => 'rule',
      '#set' => 'event_cron',
      '#label' => 'tuesdays_mail',
      '#active' => 1,
      '#weight' => '0',
      '#status' => 'custom',
      '#conditions' => 
      array (
        0 => 
        array (
          '#weight' => 0,
          '#type' => 'condition',
          '#settings' => 
          array (
            'code' => 'return (date("H")=="01" && date("w")=="5");',
            'vars' => 
            array (
            ),
          ),
          '#name' => 'rules_condition_custom_php',
          '#info' => 
          array (
            'label' => 'Benutzerdefinierten PHP-Code ausführen',
            'module' => 'PHP',
            'eval input' => 
            array (
              0 => 'code',
            ),
          ),
        ),
      ),
      '#actions' => 
      array (
        0 => 
        array (
          '#weight' => 0,
          '#info' => 
          array (
            'label' => 'Eine E-Mail an alle Benutzer mit einer bestimmten Rolle senden',
            'module' => 'System',
            'eval input' => 
            array (
              0 => 'subject',
              1 => 'message',
              2 => 'from',
            ),
          ),
          '#name' => 'rules_action_mail_to_users_of_role',
          '#settings' => 
          array (
            'recipients' => 
            array (
              0 => 4,
            ),
            'from' => '',
            'subject' => 'Mail Test',
            'message' => 'Place Content here',
          ),
          '#type' => 'action',
        ),
      ),
    ),
  ),
)

Thanks in for reading this.
Thanks in advance for a reply.

Greetings
JThan

Comments

nickgs’s picture

I am looking for some guidance on this too. Just started researching this. I will post any findings here.