Remove number and reference list from mime mail plaintext emails
I have found the solution. Mimemail creates the plaintext version of the mail in mimemail.inc, in the beginning of the function mimemail_html_body():

  if (empty($plaintext)) {
    // @todo Remove once filter_xss() can handle direct descendant selectors in inline CSS.
    // @see http://drupal.org/node/1116930
    // @see http://drupal.org/node/370903
    // Pull out the message body.
    preg_match('|&lt;body.*?&lt;/body&gt;|mis', $body, $matches);
    $plaintext = drupal_html_to_text($matches[0]);
  }


And here the drupal_html_to_text() creates the plaintext mail with the footnotes and the url numbering. The plaintext is created here if one is not provided already. So, the simple solution is to provide the plaintext version ourselves.

My email templates are defined by my implementation of hook_mail, as text without html (and mimemail in itself creates a html version of my emails, and in the above function, creates again a plaintext version of the mail, with the footnotes and url-numbering). So, I can provide a plaintext version of the email in my implementation of hook_mail_alter:

    function mymodule_mail_alter(&amp;$message) { 
        $message['params']['plaintext'] = drupal_html_to_text(implode("\r\n\r\n", $message['body'])); 
}


(The $message['body'] is the array containing the message, with message rows as entries in the array). This might not need to be wrapped around the drupal_html_to_text() function, but in case i go nuts and start inserting html into my messages, that function will strip it off. If i start to write my emails in html, I need to write a custom function (almost a straight copy of the drupal_html_to_text() function) to create the plain text version of my mails, but without the footnotes and url numbering.

Thanks for your help, I would not have found this solution by my self.