I was thinking (and trying) about rules as well. But I need some logic which evaluates the mail address in between. Running my own action would work of course.<br><br>After all I installed mimemail and token and set up a little form so administration is easier for me. So my code looks like below now and does what i want.<br>
<br>Thanks for all the help!<br><br> <span style="font-family: courier new,monospace;"> if (!module_exists('mimemail')) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> watchdog('zuweisung', t('Module mimemail is not installed. Unable to send emails.'), NULL, 'Critical');</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> return;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $sender = variable_get('site_mail', NULL);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $recipient = variable_get('zuweisung_intake_mail_adr', NULL);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> $subject = token_replace(variable_get('zuweisung_intake_mail_subject', NULL), 'node', $node);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $body = token_replace(variable_get('zuweisung_intake_mail_contents', NULL), 'node', $node);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> mimemail($sender, $recipient, $subject, $body);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $sender = variable_get('site_mail', NULL);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> $recipient = $node->field_zuw_email[0]['email'];</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $subject = token_replace(variable_get('zuweisung_zuweiser_mail_subject', NULL), 'node', $node);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> $body = token_replace(variable_get('zuweisung_zuweiser_mail_contents', NULL), 'node', $node);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> mimemail($sender, $recipient, $subject, $body);</span><br style="font-family: courier new,monospace;">
<br><br><div class="gmail_quote">2010/1/28 Klaus Purer <span dir="ltr"><<a href="mailto:klaus.purer@gmail.com">klaus.purer@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<div class="im"><br>
On 28/01/10 11:02, Ernst Plüss wrote:<br>
> I need a solution which sends the email right after the node has been<br>
> created (30-60 Seconds delay would be ok).<br>
><br>
> I had a quick look at the rules scheduler code. Unfortunately it's not a<br>
> real timer solution. It just wirtes a record to the db. The next time cron<br>
> is run all sceduled rule sets which have expired are executed. I think it's<br>
> not a good idea to call cron every 60 Seconds.<br>
<br>
</div>You can do it with the rules module, but you won't need rules scheduler.<br>
Just use the event "After saving new content" and the action "Send a<br>
mail to an arbitrary mail address".<br>
<br>
If you have installed the token module, you can use token placeholders<br>
in the mail text, like content author or other properties of the content.<br>
<font color="#888888"><br>
--<br>
Klaus Purer<br>
This E-Mail contains a digital signature and can be verified with this<br>
PGP|GPG Public Key: <a href="http://web.student.tuwien.ac.at/%7Ee0426223/key/kp.asc" target="_blank">http://web.student.tuwien.ac.at/~e0426223/key/kp.asc</a><br>
<br>
</font></blockquote></div><br>