if (aStatusFeedback) url->SetStatusFeedback(aStatusFeedback);
nsresult NS_MsgBuildSmtpUrl(nsIFileSpec * aFilePath,                            const char* aSmtpHostName,                             const char* aSmtpUserName,                             const char * aRecipients,                             nsIMsgIdentity * aSenderIdentity,                            nsIUrlListener * aUrlListener,                             nsIInterfaceRequestor* aNotificationCallbacks,                            nsIURI ** aUrl){	// mscott: this function is a convience hack until netlib actually dispatches smtp urls.	// in addition until we have a session to get a password, host and other stuff from, we need to use default values....	// ..for testing purposes....		nsresult rv = NS_OK;	nsCOMPtr <nsISmtpUrl> smtpUrl (do_CreateInstance(kCSmtpUrlCID, &rv));	if (NS_SUCCEEDED(rv) && smtpUrl)	{		nsCAutoString urlSpec("smtp://");		if ((const char *)aSmtpUserName) {			nsXPIDLCString escapedUsername;			*((char **)getter_Copies(escapedUsername)) = nsEscape((const char *)aSmtpUserName, url_XAlphas);			urlSpec += (const char *)escapedUsername;			urlSpec += '@';		}		urlSpec += (const char*)aSmtpHostName;		urlSpec += ':';		urlSpec.AppendInt(SMTP_PORT);		if ((const char *)urlSpec)		{			nsCOMPtr<nsIMsgMailNewsUrl> url = do_QueryInterface(smtpUrl);			url->SetSpec((const char *)urlSpec);            smtpUrl->SetRecipients(aRecipients);			smtpUrl->SetPostMessageFile(aFilePath);			smtpUrl->SetSenderIdentity(aSenderIdentity);            smtpUrl->SetNotificationCallbacks(aNotificationCallbacks);                        nsCOMPtr<nsIPrompt> smtpPrompt(do_GetInterface(aNotificationCallbacks));            nsCOMPtr<nsIAuthPrompt> smtpAuthPrompt(do_GetInterface(aNotificationCallbacks));            if (!smtpPrompt || !smtpAuthPrompt)            {              nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));              if (wwatch) {                if (!smtpPrompt)                  wwatch->GetNewPrompter(0, getter_AddRefs(smtpPrompt));                if (!smtpAuthPrompt)                  wwatch->GetNewAuthPrompter(0, getter_AddRefs(smtpAuthPrompt));              }            }            smtpUrl->SetPrompt(smtpPrompt);                        smtpUrl->SetAuthPrompt(smtpAuthPrompt);			url->RegisterListener(aUrlListener);		}		rv = smtpUrl->QueryInterface(NS_GET_IID(nsIURI), (void **) aUrl);	 }	 return rv;}