printf("___TRACE___BUG_79775___ME#007___\n");
CreateTheComposeWindow(nsIMsgCompFields     *compFields,                       nsMsgAttachmentData  *attachmentList,                       MSG_ComposeType		composeType,                       MSG_ComposeFormat    composeFormat,                       nsIMsgIdentity *		identity){nsresult            rv;MSG_ComposeFormat   format = nsIMsgCompFormat::Default;printf("___TRACE___BUG_79775___ME#006___\n");#ifdef NS_DEBUGprintf("RICHIE: Need to do something with the attachment data!!!!\n");mime_dump_attachments ( attachmentList );#endif  nsMsgAttachmentData *curAttachment = attachmentList;  if (curAttachment)  {	nsCAutoString attachments;	char* spec = nsnull;	while (curAttachment && curAttachment->real_name)	  {		rv = curAttachment->url->GetSpec(&spec);		if (NS_SUCCEEDED(rv) && spec)		  {			if (attachments.Length())			  attachments.Append(',');			attachments.Append(spec);			nsCRT::free(spec);			spec = nsnull;		  }		curAttachment++;	  }	if (attachments.Length())	{	  compFields->SetAttachments(attachments);	  // remember the temp files to delete	  compFields->SetTemporaryFiles(attachments);	}  }  NS_WITH_SERVICE(nsIMsgComposeService, msgComposeService,				  kCMsgComposeServiceCID, &rv);   if ((NS_FAILED(rv)) || (!msgComposeService))    return rv;   printf("___TRACE___BUG_79775___ME#007___\n");  if (identity && composeType == nsIMsgCompType::ForwardInline)  {  	PRBool composeHtml = PR_FALSE;  	identity->GetComposeHtml(&composeHtml);  	if (composeHtml)		format = nsIMsgCompFormat::HTML;	else	{		format = nsIMsgCompFormat::PlainText;		/* do we we need to convert the HTML body to plain text? */		if (composeFormat == nsIMsgCompFormat::HTML)			compFields->ConvertBodyToPlainText();	}  }  else    format = composeFormat;    printf("___TRACE___BUG_79775___ME#008___\n");  rv = msgComposeService->OpenComposeWindowWithCompFields(nsnull, /* default chrome */                                                          composeType, format, compFields, identity);  return rv;}