如何解决 Drupal 6 中找不到的功能

发布于 2024-11-29 21:55:03 字数 190 浏览 0 评论 0原文

所以我在 Drupal 6 上使用 queue_mail 模块,每次我调用函数 queue_mail_send() 时,drupal 都会抱怨它找不到该函数......

我知道Drupal 7 中有一个代码注册表,但是 Drupal 6 呢?如何让 Drupal 6 识别该函数而不是返回致命错误?

So I'm using the queue_mail module on Drupal 6 and everytime I call the function queue_mail_send(), drupal complains that it can't find the function...

I know that there's a code registry in Drupal 7, but what about Drupal 6? how do I get Drupal 6 to recognize that function instead of returning a fatal error?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原来是傀儡 2024-12-06 21:55:03

我在新安装的 drupal 6 上对此进行了测试,它为我提供了该功能。只需仔细检查该模块是否已启用以及所有这些好东西。

然后,确保传递到 queue_mail_send($message = array()) 函数的 $message 数组包含以下元素:

  • 标头(数组)
    • 来自
    • 回复
    • X-Mailer
  • 主题
  • 正文

例如,以下是我构建 $message 数组的方式:

$message = array(
  'to' => '[email protected]',
  'subject' => 'example',
  'body' => 'hey', 
  'headers' => array(
    'From' => '[email protected]',
    'Reply-To' => 'Reply-To: [email protected]',
    'X-Mailer' => 'PHP',
  )
);

I tested this out on a fresh drupal 6 install and it picked up the function for me. Just double check that the module is enabled and all of that good stuff.

Then, make sure that your $message array that is passed into queue_mail_send($message = array()) function has these elements:

  • headers (array)
    • From
    • Reply-To
    • X-Mailer
  • to
  • subject
  • body

For example, here's how I constructed my $message array:

$message = array(
  'to' => '[email protected]',
  'subject' => 'example',
  'body' => 'hey', 
  'headers' => array(
    'From' => '[email protected]',
    'Reply-To' => 'Reply-To: [email protected]',
    'X-Mailer' => 'PHP',
  )
);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文