switch (code)	{ case NS_ERROR_SMTP_SERVER_ERROR: case NS_ERROR_TCP_READ_ERROR: case NS_ERROR_SENDING_FROM_COMMAND: case NS_ERROR_SENDING_RCPT_COMMAND: case NS_ERROR_SENDING_DATA_COMMAND: case NS_ERROR_SENDING_MESSAGE: smtpBundle->GetStringByID(code, getter_Copies(eMsg)); msg = nsTextFormatter::vsmprintf(eMsg, args); break; default: smtpBundle->GetStringByID(NS_ERROR_COMMUNICATIONS_ERROR, getter_Copies(eMsg)); msg = nsTextFormatter::smprintf(eMsg, code); break;
switch (code) { case NS_ERROR_SMTP_SERVER_ERROR: case NS_ERROR_TCP_READ_ERROR: case NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED: case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1: case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2: case NS_ERROR_SENDING_FROM_COMMAND: case NS_ERROR_SENDING_RCPT_COMMAND: case NS_ERROR_SENDING_DATA_COMMAND: case NS_ERROR_SENDING_MESSAGE: smtpBundle->GetStringByID(code, getter_Copies(eMsg)); msg = nsTextFormatter::vsmprintf(eMsg, args); break; default: smtpBundle->GetStringByID(NS_ERROR_COMMUNICATIONS_ERROR, getter_Copies(eMsg)); msg = nsTextFormatter::smprintf(eMsg, code); break;
nsresult nsExplainErrorDetails(nsISmtpUrl * aSmtpUrl, int code, ...){  NS_ENSURE_ARG(aSmtpUrl);  nsresult rv = NS_OK;  va_list args;	  nsCOMPtr<nsIPrompt> dialog;  aSmtpUrl->GetPrompt(getter_AddRefs(dialog));  NS_ENSURE_TRUE(dialog, NS_ERROR_FAILURE);  PRUnichar *  msg;  nsXPIDLString eMsg;  nsCOMPtr<nsIMsgStringService> smtpBundle = do_GetService(NS_MSG_SMTPSTRINGSERVICE_CONTRACTID);    va_start (args, code);    switch (code)	{		case NS_ERROR_SMTP_SERVER_ERROR:                case NS_ERROR_TCP_READ_ERROR:                case NS_ERROR_SENDING_FROM_COMMAND:                case NS_ERROR_SENDING_RCPT_COMMAND:                case NS_ERROR_SENDING_DATA_COMMAND:                case NS_ERROR_SENDING_MESSAGE:                     smtpBundle->GetStringByID(code, getter_Copies(eMsg));                  msg = nsTextFormatter::vsmprintf(eMsg, args);                  break;                default:                  smtpBundle->GetStringByID(NS_ERROR_COMMUNICATIONS_ERROR, getter_Copies(eMsg));                  msg = nsTextFormatter::smprintf(eMsg, code);                  break;  }    if (msg)   {    rv = dialog->Alert(nsnull, msg);    nsTextFormatter::smprintf_free(msg);  }    va_end (args);    return rv;}