} else {  if (PL_strchr(uri, ' ') != nsnull) { nsCAutoString uriStr(uri); uriStr.ReplaceSubstring(" ", "%20"); PR_Free(uri); uri = PL_strdup(uriStr.get()); prefs->SetCharPref("mail.default_sendlater_uri", uriStr.get()); }
GetFolderURIFromUserPrefs(nsMsgDeliverMode   aMode,                          nsIMsgIdentity* identity){  nsresult      rv = NS_OK;  char          *uri = nsnull;  if (!identity) return nsnull;  if (aMode == nsIMsgSend::nsMsgQueueForLater)       // QueueForLater (Outbox)  {    nsCOMPtr<nsIPref> prefs(do_GetService(kPrefCID, &rv));     if (NS_FAILED(rv) || !prefs)       return nsnull;    rv = prefs->CopyCharPref("mail.default_sendlater_uri", &uri);       if (NS_FAILED(rv) || !uri) {	uri = PR_smprintf("%s", ANY_SERVER);	rv = NS_OK;    }  }  else if (aMode == nsIMsgSend::nsMsgSaveAsDraft)    // SaveAsDraft (Drafts)  {    rv = identity->GetDraftFolder(&uri);  }  else if (aMode == nsIMsgSend::nsMsgSaveAsTemplate) // SaveAsTemplate (Templates)  {    rv = identity->GetStationeryFolder(&uri);  }  else   {  	PRBool doFcc = PR_FALSE;    rv = identity->GetDoFcc(&doFcc);    if (doFcc)    	rv = identity->GetFccFolder(&uri);    else    	uri = PL_strdup("");  }  return uri;}