Bug #28984 --> add a getter & setter for recipients. The recipients are now stored as a field in the smtp url

instead of as part of the url spec.
r=sspitzer
a=phil
This commit is contained in:
mscott%netscape.com 2000-03-01 03:08:05 +00:00
Родитель 49519e5eed
Коммит ee923ac9ba
2 изменённых файлов: 13 добавлений и 12 удалений

Просмотреть файл

@ -1269,7 +1269,7 @@ nsresult nsSmtpProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer )
nsXPIDLCString addresses;
nsCOMPtr<nsIMsgHeaderParser> parser = do_GetService(kHeaderParserCID);
m_runningURL->GetAllRecipients(getter_Copies(addresses));
m_runningURL->GetRecipients(getter_Copies(addresses));
if (NS_SUCCEEDED(rv) && parser)
{

Просмотреть файл

@ -440,27 +440,28 @@ nsresult nsSmtpUrl::ParseUrl()
// set the username
nsXPIDLCString userName;
rv = GetPreHost(getter_Copies(userName));
rv = GetUsername(getter_Copies(userName));
if (NS_FAILED(rv)) return rv;
m_userName = (const char *)userName;
return NS_OK;
}
// the recipients should consist of just the path part up to to the query
// part
nsXPIDLCString toPart;
rv = GetFileName(getter_Copies(toPart));
m_toPart = toPart;
NS_IMETHODIMP
nsSmtpUrl::SetRecipients(const char * aRecipientsList)
{
NS_ENSURE_ARG(aRecipientsList);
m_toPart = aRecipientsList;
if (!m_toPart.IsEmpty())
nsUnescape(m_toPart);
return rv;
return NS_OK;
}
// Caller must call PR_FREE on list when it is done with it. This list is a list of all
// recipients to send the email to. each name is NULL terminated...
NS_IMETHODIMP
nsSmtpUrl::GetAllRecipients(char ** aRecipientsList)
nsSmtpUrl::GetRecipients(char ** aRecipientsList)
{
NS_ENSURE_ARG_POINTER(aRecipientsList);
if (aRecipientsList)
*aRecipientsList = m_toPart.ToNewCString();
return NS_OK;