开源里有的东西,应该尽量复用,Drupal6要写个群发功能比较花时间,这可以使用action_email_role这个module。它本来是个action,需要trigger来激活。但它里面就有现成的群发功能,只要激活了它,功能就可以用代码调用。

以下是群发例子:

<?php
$context = array(
  'subject' => 'Test - send mail to administrator',
  'message' => 'The content.',
  'recipient' => array(
    3 => 'administrator',
    5 => 'super administrator'
  )
);
$object = new stdClass;
action_email_role_send_email_to_roles($object, $context);

  

相关文章:

  • 2022-02-02
  • 2022-01-02
  • 2021-07-17
  • 2021-11-01
  • 2022-12-23
  • 2021-08-08
  • 2021-11-14
  • 2021-12-05
猜你喜欢
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2021-08-05
  • 2021-12-05
相关资源
相似解决方案