开发者

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...

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?


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' => 'recipient@example.com',
  'subject' => 'example',
  'body' => 'hey', 
  'headers' => array(
    'From' => 'webmaster@example.com',
    'Reply-To' => 'Reply-To: webmaster@example.com',
    'X-Mailer' => 'PHP',
  )
);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜