I need to send an email to a list of addresses that are generated by a php code (the rule is when someone creates a child node all it's sibling author's get an email)

I can't do it with execute php code action because i can't send mail with a php snippet
And I can't do it with sending mail to arbitrary address action.

Is it possible to do this somehow?
Maybe i can generate the email list in a php snippet and use php to print it on the recipient field in arbitrary address action?
Or is this a feature request?

Thanks

Comments

yaron24’s picture

Component: User Interface » User interface
Status: Active » Closed (fixed)

I've done this with execute php code

/* code to generate addresses goes into $to */
$to = "test@example, shuki@exmpaple.com";

$settings = array();

$settings['to'] = $to;
$settings['subject'] = "email subject";
$settings['message'] = "message body";

rules_action_mail($settings);

and it works.

closing this issue, but other suggestions are welcomed