Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I am using FAQ Ask along with the FAQ module. Everything works well but the emails are coming all bunched up. I need to be able to re-arrange the layout as I want (simple text with active links).

Below is what I see:

enter image description here

share|improve this question

1 Answer

These emails are assembled in the faq_ask_mail function (faq_ask,nodule, line 1013). The body is assembled beginning at line 1077.

If you wish to open up the body, you can go in and include some newline ('\n') characters into the text.

Since this hacks the module core, perhaps you should submit a patch as a feature request.

EDIT:

faq_ask_mail is an implementation of hook_mail. You can define your own hook_mail in a custom module to override the output. You must, however, adjust the weight of your custom module so it is processed after the faq_ask module. You would handle it as follows:

function MYMODULE_mail(&$key, &$message, &$params) {
  $body = $message['body'];
  switch ($key) {
    case 'notify_expert':
    case 'notify_asker' :
      /*** Change the formatting of $body ***/
      $body = str_replace("\.", "\.\n\n", $body);
      break;
  }
  $message['body'] = $body;
}

Remember that this will have no effect if it is executed before the faq_ask_mail function.

share|improve this answer
Are you saying that the only way to fix this is by patching this module? Can it be creating a custom module instead? – Otter Creative Studio Mar 23 at 18:53
No, just the most direct. See my edit above. – Triskelion Mar 23 at 20:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.