InitializeProtocol(m_urlString); m_url->SetSpec(m_urlString); m_url->SetHost(DEFAULT_HOST);   m_url->SetPostMessageFile(fileName); m_url->SetUserEmailAddress(userName); m_url->SetUserPassword(DEFAULT_PASSWORD);
nsFilePath filePath (fileName); m_smtpService->SendMailMessage(filePath, userName, recipients, nsnull);
nsresult nsSmtpTestDriver::OnSendMessageInFile(){	nsresult rv = NS_OK; 	char * fileName = nsnull;	char * userName = nsnull;	char * userPassword = nsnull;	char * displayString = nsnull;		PL_strcpy(m_userData, DEFAULT_FILE);	displayString = PR_smprintf("Location of message [%s]: ", m_userData);	rv = PromptForUserDataAndBuildUrl(displayString);	PR_FREEIF(displayString);	fileName = PL_strdup(m_userData);	// now ask the user who to send the message too...	PL_strcpy(m_userData, DEFAULT_RECIPIENT);	displayString = PR_smprintf("Recipient of message [%s]: ", m_userData);	rv = PromptForUserDataAndBuildUrl(displayString);	PR_FREEIF(displayString);	m_urlString[0] = '\0';	PL_strcpy(m_urlString, m_urlSpec);	PL_strcat(m_urlString, "/");	PL_strcat(m_urlString, m_userData); // tack on recipient...		// now ask the user what their address is...	PL_strcpy(m_userData, DEFAULT_SENDER);	displayString = PR_smprintf("Email address of sender [%s]: ", m_userData);	rv = PromptForUserDataAndBuildUrl(displayString);	PR_FREEIF(displayString);	userName = PL_strdup(m_userData);	// SMTP is a connectionless protocol...so we always start with a new	// SMTP protocol instance every time we launch a mailto url...	InitializeProtocol(m_urlString);  // this creates a transport	m_url->SetSpec(m_urlString); // reset spec	m_url->SetHost(DEFAULT_HOST);		// store the file name in the url...	m_url->SetPostMessageFile(fileName);	m_url->SetUserEmailAddress(userName);	m_url->SetUserPassword(DEFAULT_PASSWORD);	PR_FREEIF(fileName);	PR_FREEIF(userName);			printf("Running %s\n", m_urlString);	rv = m_SmtpProtocol->LoadURL(m_url);	return rv;}