简体   繁体   English

我如何解决 Drupal 中找不到的 function 6

[英]How do i resolve function not found in 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... 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?我知道 Drupal 7 中有一个代码注册表,但是 Drupal 6 呢? how do I get Drupal 6 to recognize that function instead of returning a fatal error?如何让 Drupal 6 识别 function 而不是返回致命错误?

I tested this out on a fresh drupal 6 install and it picked up the function for me.我在新的 drupal 6 安装上对此进行了测试,它为我选择了 function。 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:然后,确保传递给 queue_mail_send( $message queue_mail_send($message = array()) function 的 $message 数组具有以下元素:

  • headers (array)标头(数组)
    • From
    • Reply-To回复
    • X-Mailer X-Mailer
  • to
  • subject主题
  • body身体

For example, here's how I constructed my $message array:例如,这是我构建 $message 数组的方式:

$message = array(
  'to' => 'recipient@example.com',
  'subject' => 'example',
  'body' => 'hey', 
  'headers' => array(
    'From' => 'webmaster@example.com',
    'Reply-To' => 'Reply-To: webmaster@example.com',
    'X-Mailer' => 'PHP',
  )
);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM