Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Member Functions | Private Attributes
nsSmtpProtocol Class Reference

#include <nsSmtpProtocol.h>

Inheritance diagram for nsSmtpProtocol:
Inheritance graph
[legend]
Collaboration diagram for nsSmtpProtocol:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIMSGLOGONREDIRECTIONREQUESTER 
nsSmtpProtocol (nsIURI *aURL)
virtual ~nsSmtpProtocol ()
virtual nsresult LoadUrl (nsIURI *aURL, nsISupports *aConsumer=nsnull)
virtual PRInt32 SendData (nsIURI *aURL, const char *dataBuffer, PRBool aSuppressLogging=PR_FALSE)
NS_IMETHOD OnStopRequest (nsIRequest *request, nsISupports *ctxt, nsresult status)
void OnLogonRedirectionError (in wstring pErrMsg, in boolean badPassword)
void OnLogonRedirectionProgress (in nsMsgLogonRedirectionState pState)
void OnLogonRedirectionReply (in wstring pHost, in unsigned short pPort, in string pCookieData, in unsigned short pCookieSize)

Private Member Functions

nsresult RequestOverrideInfo (nsISmtpServer *aSmtpServer)
void Initialize (nsIURI *aURL)
virtual nsresult ProcessProtocolState (nsIURI *url, nsIInputStream *inputStream, PRUint32 sourceOffset, PRUint32 length)
void UpdateStatus (PRInt32 aStatusID)
void UpdateStatusWithString (const PRUnichar *aStatusString)
PRInt32 SmtpResponse (nsIInputStream *inputStream, PRUint32 length)
PRInt32 ExtensionLoginResponse (nsIInputStream *inputStream, PRUint32 length)
PRInt32 SendHeloResponse (nsIInputStream *inputStream, PRUint32 length)
PRInt32 SendEhloResponse (nsIInputStream *inputStream, PRUint32 length)
PRInt32 AuthGSSAPIFirst ()
PRInt32 AuthGSSAPIStep ()
PRInt32 AuthLoginStep0 ()
PRInt32 AuthLoginStep0Response ()
PRInt32 AuthLoginStep1 ()
PRInt32 AuthLoginStep2 ()
PRInt32 AuthLoginResponse (nsIInputStream *stream, PRUint32 length)
PRInt32 SendTLSResponse ()
PRInt32 SendVerifyResponse ()
PRInt32 SendMailResponse ()
PRInt32 SendRecipientResponse ()
PRInt32 SendDataResponse ()
PRInt32 SendPostData ()
PRInt32 SendMessageResponse ()
PRInt32 CramMD5LoginResponse ()
PRInt32 ProcessAuth ()
PRInt32 SendMessageInFile ()
void AppendHelloArgument (nsACString &aResult)
nsresult GetPassword (char **aPassword)
nsresult GetUsernamePassword (char **aUsername, char **aPassword)
nsresult PromptForPassword (nsISmtpServer *aSmtpServer, nsISmtpUrl *aSmtpUrl, const PRUnichar **formatStrings, char **aPassword)
void BackupAuthFlags ()
void RestoreAuthFlags ()

Private Attributes

nsCString mLogonCookie
nsCOMPtr< nsISupports > mPendingConsumer
nsCOMPtr< nsIMsgLogonRedirectorm_logonRedirector
nsCOMPtr< nsISmtpUrlm_runningURL
nsresult m_urlErrorState
PRUint32 m_LastTime
nsCOMPtr< nsIMsgStatusFeedbackm_statusFeedback
SmtpState m_nextState
SmtpState m_nextStateAfterResponse
PRInt32 m_responseCode
PRInt32 m_previousResponseCode
PRInt32 m_continuationResponse
nsCString m_responseText
nsMsgLineStreamBuffer * m_lineStreamBuffer
char * m_addressCopy
char * m_addresses
PRUint32 m_addressesLeft
char * m_verifyAddress
nsXPIDLCString m_mailAddr
nsXPIDLCString m_helloArgument
PRInt32 m_sizelimit
PRInt32 m_prefAuthMethod
PRBool m_prefTrySecAuth
PRBool m_usernamePrompted
PRInt32 m_prefTrySSL
PRBool m_tlsEnabled
PRBool m_tlsInitiated
PRBool m_sendDone
PRInt32 m_totalAmountRead
PRUint32 m_totalMessageSize
char * m_dataBuf
PRUint32 m_dataBufSize
PRInt32 m_originalContentLength
nsCOMPtr< nsIMsgStringServicemSmtpBundle
PRInt32 m_origAuthFlags

Detailed Description

Definition at line 128 of file nsSmtpProtocol.h.


Constructor & Destructor Documentation

Definition at line 233 of file nsSmtpProtocol.cpp.

    : nsMsgAsyncWriteProtocol(aURL)
{
    Initialize(aURL);
}

Here is the call graph for this function:

Definition at line 239 of file nsSmtpProtocol.cpp.


Member Function Documentation

void nsSmtpProtocol::AppendHelloArgument ( nsACString &  aResult) [private]

Definition at line 357 of file nsSmtpProtocol.cpp.

{
  nsresult rv;
  
  // is a custom EHLO/HELO argument configured for the transport to be used?
  if (!m_helloArgument.IsEmpty())
  {
      aResult += m_helloArgument;
  }
  else
  {
      // is a FQDN known for this system?
      char hostName[256];
      PR_GetSystemInfo(PR_SI_HOSTNAME_UNTRUNCATED, hostName, sizeof hostName);
      if ((hostName[0] != '\0') && (strchr(hostName, '.') != NULL))
      {
          aResult += hostName;
      }
      else
      {
          PRNetAddr iaddr; // IP address for this connection
          // our transport is always a nsISocketTransport
          nsCOMPtr<nsISocketTransport> socketTransport = do_QueryInterface(m_transport); 
          // should return the interface ip of the SMTP connection
          // minimum case - see bug 68877 and RFC 2821, chapter 4.1.1.1
          rv = socketTransport->GetSelfAddr(&iaddr);

          if (NS_SUCCEEDED(rv))
          {
              // turn it into a string
              char ipAddressString[64];
              if (PR_NetAddrToString(&iaddr, ipAddressString, sizeof(ipAddressString)) == PR_SUCCESS) 
              {
                  NS_ASSERTION(PR_IsNetAddrType(&iaddr, PR_IpAddrV4Mapped) == PR_FALSE,
                               "unexpected IPv4-mapped IPv6 address");

                  if (iaddr.raw.family == PR_AF_INET6)   // IPv6 style address?
                      aResult.AppendLiteral("[IPv6:");
                  else
                      aResult.AppendLiteral("[");

                  aResult.Append(nsDependentCString(ipAddressString) + NS_LITERAL_CSTRING("]"));
              }
          }
      }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1002 of file nsSmtpProtocol.cpp.

{
  nsCAutoString command("AUTH GSSAPI ");
  nsCAutoString resp;
  nsCAutoString service("smtp@");
  nsXPIDLCString hostName;
  nsXPIDLCString userName;
  nsresult rv;
  nsCOMPtr<nsISmtpServer> smtpServer;
  rv = m_runningURL->GetSmtpServer(getter_AddRefs(smtpServer));
  if (NS_FAILED(rv)) return NS_ERROR_FAILURE;

  rv = smtpServer->GetUsername(getter_Copies(userName));
  if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
  rv = smtpServer->GetHostname(getter_Copies(hostName));
  if (NS_FAILED(rv)) return NS_ERROR_FAILURE;

 service.Append(hostName);
  rv = DoGSSAPIStep1(service.get(), userName, resp);
  if (NS_FAILED(rv))
  {
    m_nextState = SMTP_AUTH_PROCESS_STATE;
    ClearFlag(SMTP_AUTH_GSSAPI_ENABLED);
    return 0;
  }
  else
    command.Append(resp);
  command.Append(CRLF);
  m_nextState = SMTP_RESPONSE;
  m_nextStateAfterResponse = SMTP_SEND_AUTH_GSSAPI_STEP;
  SetFlag(SMTP_PAUSE_FOR_READ);
  nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
  return SendData(url, command.get());
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1037 of file nsSmtpProtocol.cpp.

{
  nsresult rv;
  nsCAutoString cmd;

  // Check to see what the server said
  if (m_responseCode / 100 != 3) {
    m_nextState = SMTP_AUTH_LOGIN_RESPONSE;
    return 0;
  }

  rv = DoGSSAPIStep2(m_responseText, cmd);
  if (NS_FAILED(rv))
    cmd = "*";
  cmd += CRLF;

  m_nextStateAfterResponse = (rv == NS_SUCCESS_AUTH_FINISHED)?SMTP_AUTH_LOGIN_RESPONSE:SMTP_SEND_AUTH_GSSAPI_STEP;
  m_nextState = SMTP_RESPONSE;
  SetFlag(SMTP_PAUSE_FOR_READ);

  nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
  return SendData(url, cmd.get());
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRInt32 nsSmtpProtocol::AuthLoginResponse ( nsIInputStream stream,
PRUint32  length 
) [private]

Definition at line 932 of file nsSmtpProtocol.cpp.

{
  PRInt32 status = 0;
  nsCOMPtr<nsISmtpServer> smtpServer;
  m_runningURL->GetSmtpServer(getter_AddRefs(smtpServer));

  switch (m_responseCode/100) 
  {
    case 2:
      m_nextState = SMTP_SEND_HELO_RESPONSE;
      // fake to 250 because SendHeloResponse() tests for this
      m_responseCode = 250;
      break;
    case 3:
      m_nextState = SMTP_SEND_AUTH_LOGIN_STEP2;
      break;
    case 5:
    default:
      if (smtpServer)
      {
        // If one authentication failed, we're going to
        // fall back on a less secure login method.
        if(TestFlag(SMTP_AUTH_GSSAPI_ENABLED))
          ClearFlag(SMTP_AUTH_GSSAPI_ENABLED);
        else if(TestFlag(SMTP_AUTH_DIGEST_MD5_ENABLED))
          // if DIGEST-MD5 enabled, clear it if we failed.
          ClearFlag(SMTP_AUTH_DIGEST_MD5_ENABLED);
        else if(TestFlag(SMTP_AUTH_CRAM_MD5_ENABLED))
          // if CRAM-MD5 enabled, clear it if we failed. 
          ClearFlag(SMTP_AUTH_CRAM_MD5_ENABLED);
        else if(TestFlag(SMTP_AUTH_NTLM_ENABLED))
          // if NTLM enabled, clear it if we failed. 
          ClearFlag(SMTP_AUTH_NTLM_ENABLED);
        else if(TestFlag(SMTP_AUTH_MSN_ENABLED))
          // if MSN enabled, clear it if we failed. 
          ClearFlag(SMTP_AUTH_MSN_ENABLED);
        else if(TestFlag(SMTP_AUTH_PLAIN_ENABLED))
          // if PLAIN enabled, clear it if we failed. 
          ClearFlag(SMTP_AUTH_PLAIN_ENABLED);
        else if(TestFlag(SMTP_AUTH_LOGIN_ENABLED))
          // if LOGIN enabled, clear it if we failed. 
          ClearFlag(SMTP_AUTH_LOGIN_ENABLED);

        // Only forget the password if we didn't get here from the redirection
        // and if we've no mechanism left.
        if (!TestFlag(SMTP_AUTH_ANY_ENABLED) && mLogonCookie.IsEmpty())
        {
            smtpServer->ForgetPassword();
            if (m_usernamePrompted)
                smtpServer->SetUsername("");

            // Let's restore the original auth flags from SendEhloResponse so we can
            // try them again with new password and username
            RestoreAuthFlags();
            // except for gssapi, which doesn't care about the new password.
            ClearFlag(SMTP_AUTH_GSSAPI_ENABLED);
        }

        m_nextState = SMTP_AUTH_PROCESS_STATE;
      }
      else
          status = NS_ERROR_SMTP_PASSWORD_UNDEFINED;
      break;
  }
  
  return (status);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1066 of file nsSmtpProtocol.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1077 of file nsSmtpProtocol.cpp.

{
    // need the test to be here instead in AuthLoginResponse() to
    // continue with step 1 instead of 2 in case of a code 3xx
    m_nextState = (m_responseCode/100 == 3) ?
                  SMTP_SEND_AUTH_LOGIN_STEP1 : SMTP_AUTH_LOGIN_RESPONSE;

    return 0;
}

Here is the caller graph for this function:

Definition at line 1087 of file nsSmtpProtocol.cpp.

{
  char buffer[512];
  nsresult rv;
  PRInt32 status = 0;
  nsXPIDLCString username;
  char *base64Str = nsnull;
  nsXPIDLCString origPassword;
  nsCAutoString password;
  nsCOMPtr<nsISmtpServer> smtpServer;
  rv = m_runningURL->GetSmtpServer(getter_AddRefs(smtpServer));
  if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
  
  rv = smtpServer->GetUsername(getter_Copies(username));
  
  if (username.IsEmpty()) {
    rv = GetUsernamePassword(getter_Copies(username), getter_Copies(origPassword));
    m_usernamePrompted = PR_TRUE;
    password.Assign(origPassword);
    if (username.IsEmpty() || password.IsEmpty())
      return NS_ERROR_SMTP_PASSWORD_UNDEFINED;
  }
  else if (!TestFlag(SMTP_USE_LOGIN_REDIRECTION))
  {
    rv = GetPassword(getter_Copies(origPassword));
    password.Assign(origPassword);
    if (password.IsEmpty())
      return NS_ERROR_SMTP_PASSWORD_UNDEFINED;
  }
  else
    password.Assign(mLogonCookie);
  
  if (TestFlag(SMTP_AUTH_CRAM_MD5_ENABLED))
    PR_snprintf(buffer, sizeof(buffer), "AUTH CRAM-MD5" CRLF);
  else
  if (TestFlag(SMTP_AUTH_NTLM_ENABLED) || TestFlag(SMTP_AUTH_MSN_ENABLED))
  {
    nsCAutoString response;
    rv = DoNtlmStep1(username.get(), password.get(), response);
    PR_snprintf(buffer, sizeof(buffer), TestFlag(SMTP_AUTH_NTLM_ENABLED) ?
                                        "AUTH NTLM %.256s" CRLF :
                                        "%.256s" CRLF, response.get());
  }
  else
  if (TestFlag(SMTP_AUTH_PLAIN_ENABLED))
  {
    char plain_string[512];
    int len = 1; /* first <NUL> char */
    
    memset(plain_string, 0, 512);
    PR_snprintf(&plain_string[1], 510, "%s", (const char*)username);
    len += PL_strlen(username);
    len++; /* second <NUL> char */
    PR_snprintf(&plain_string[len], 511-len, "%s", password.get());
    len += password.Length();
    
    base64Str = PL_Base64Encode(plain_string, len, nsnull);
    PR_snprintf(buffer, sizeof(buffer), "AUTH PLAIN %.256s" CRLF, base64Str);
  }
  else
  if (TestFlag(SMTP_AUTH_LOGIN_ENABLED))
  {
    base64Str = PL_Base64Encode((const char *)username, 
        strlen((const char*)username), nsnull);
    PR_snprintf(buffer, sizeof(buffer), "%.256s" CRLF, base64Str);
  } 
  else
    return (NS_ERROR_COMMUNICATIONS_ERROR);
    
  nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
  status = SendData(url, buffer, PR_TRUE);
  m_nextState = SMTP_RESPONSE;
  m_nextStateAfterResponse = SMTP_AUTH_LOGIN_RESPONSE;
  SetFlag(SMTP_PAUSE_FOR_READ);
  nsCRT::free(base64Str);
    
  return (status);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1166 of file nsSmtpProtocol.cpp.

{
  
  /* use cached smtp password first
  * if not then use cached pop password
  * if pop password undefined 
  * sync with smtp password
  */
  PRInt32 status = 0;
  nsresult rv;
  nsXPIDLCString origPassword;
  nsCAutoString password;
  
  if (!TestFlag(SMTP_USE_LOGIN_REDIRECTION))
  {
    rv = GetPassword(getter_Copies(origPassword));
    PRInt32 passwordLength = strlen((const char *) origPassword);
    if (!(const char*) origPassword || passwordLength == 0)
      return NS_ERROR_SMTP_PASSWORD_UNDEFINED;
    password.Assign((const char*) origPassword);
  }
  else
    password.Assign(mLogonCookie);
  
  if (!password.IsEmpty()) 
  {
    char buffer[512];
    if (TestFlag(SMTP_AUTH_CRAM_MD5_ENABLED))
    {
      unsigned char digest[DIGEST_LENGTH];
      char * decodedChallenge = PL_Base64Decode(m_responseText.get(), 
        m_responseText.Length(), nsnull);
      
      if (decodedChallenge)
        rv = MSGCramMD5(decodedChallenge, strlen(decodedChallenge), password.get(), password.Length(), digest);
      else
        rv = NS_ERROR_FAILURE;
      
      PR_Free(decodedChallenge);
      if (NS_SUCCEEDED(rv) && digest)
      {
        nsCAutoString encodedDigest;
        char hexVal[8];
        
        for (PRUint32 j=0; j<16; j++) 
        {
          PR_snprintf (hexVal,8, "%.2x", 0x0ff & (unsigned short)digest[j]);
          encodedDigest.Append(hexVal); 
        }
        
        nsCOMPtr<nsISmtpServer> smtpServer;
        rv = m_runningURL->GetSmtpServer(getter_AddRefs(smtpServer));
        if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
        
        nsXPIDLCString userName;
        rv = smtpServer->GetUsername(getter_Copies(userName));
        
        PR_snprintf(buffer, sizeof(buffer), "%s %s", userName.get(), encodedDigest.get());
        char *base64Str = PL_Base64Encode(buffer, strlen(buffer), nsnull);
        PR_snprintf(buffer, sizeof(buffer), "%s" CRLF, base64Str);
        PR_Free(base64Str);
      }
      if (NS_FAILED(rv))
        PR_snprintf(buffer, sizeof(buffer), "*" CRLF);
    }
    else
    if (TestFlag(SMTP_AUTH_NTLM_ENABLED) || TestFlag(SMTP_AUTH_MSN_ENABLED))
    {
      nsCAutoString response;
      rv = DoNtlmStep2(m_responseText, response);
      PR_snprintf(buffer, sizeof(buffer), "%.256s" CRLF, response.get());
    }
    else
    {
      char *base64Str = PL_Base64Encode(password.get(), password.Length(), nsnull);
      PR_snprintf(buffer, sizeof(buffer), "%.256s" CRLF, base64Str);
      nsCRT::free(base64Str);
    }

    nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
    status = SendData(url, buffer, PR_TRUE);
    m_nextState = SMTP_RESPONSE;
    m_nextStateAfterResponse = SMTP_AUTH_LOGIN_RESPONSE;
    SetFlag(SMTP_PAUSE_FOR_READ);   
    return (status);
  }
  
  return -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 921 of file nsSmtpProtocol.cpp.

Here is the caller graph for this function:

PRInt32 nsSmtpProtocol::ExtensionLoginResponse ( nsIInputStream inputStream,
PRUint32  length 
) [private]

Definition at line 525 of file nsSmtpProtocol.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsSmtpProtocol::GetPassword ( char **  aPassword) [private]

Definition at line 1782 of file nsSmtpProtocol.cpp.

{
    NS_ENSURE_ARG_POINTER(aPassword);

    nsresult rv;
    nsCOMPtr<nsISmtpUrl> smtpUrl = do_QueryInterface(m_runningURL, &rv);
    NS_ENSURE_SUCCESS(rv,rv); 
   
    nsCOMPtr<nsISmtpServer> smtpServer;
    rv = smtpUrl->GetSmtpServer(getter_AddRefs(smtpServer));
    NS_ENSURE_SUCCESS(rv,rv);
    
    rv = smtpServer->GetPassword(aPassword);
    NS_ENSURE_SUCCESS(rv,rv); 

    if (*aPassword && **aPassword)
        return rv;
    // empty password

    nsCRT::free(*aPassword);
    *aPassword = 0;

    nsXPIDLCString redirectorType; 
    rv = smtpServer->GetRedirectorType(getter_Copies(redirectorType));
    NS_ENSURE_SUCCESS(rv,rv);
      
    nsCAutoString prefName("smtp.");
    prefName.Append(redirectorType);
    prefName.Append(".hide_hostname_for_password");
    
    nsCOMPtr <nsIPrefService> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
    NS_ENSURE_SUCCESS(rv,rv);
    
    nsCOMPtr<nsIPrefBranch> prefBranch; 
    rv = prefs->GetBranch(nsnull, getter_AddRefs(prefBranch)); 
    NS_ENSURE_SUCCESS(rv,rv);

    nsXPIDLCString username;
    rv = smtpServer->GetUsername(getter_Copies(username));
    NS_ENSURE_SUCCESS(rv, rv);
    
    NS_ConvertASCIItoUCS2 usernameUTF16(username);
    const PRUnichar *formatStrings[] =
    {
      usernameUTF16.get(),
      nsnull  // this will be overwritten in some cases.
    };

    PRBool hideHostnameForPassword = PR_FALSE;
    rv = prefBranch->GetBoolPref(prefName.get(), &hideHostnameForPassword);
    // for certain redirector types, we don't want to show the
    // hostname to the user when prompting for password
    nsAutoString hostnameUTF16;
    if (!hideHostnameForPassword) 
    {
      nsXPIDLCString hostname;      
      rv = smtpServer->GetHostname(getter_Copies(hostname));
      NS_ENSURE_SUCCESS(rv, rv);
      CopyASCIItoUTF16(hostname, hostnameUTF16);
      formatStrings[1] = hostnameUTF16.get();
    }
    rv = PromptForPassword(smtpServer, smtpUrl, formatStrings, aPassword);
    NS_ENSURE_SUCCESS(rv,rv);
    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsSmtpProtocol::GetUsernamePassword ( char **  aUsername,
char **  aPassword 
) [private]

Definition at line 1885 of file nsSmtpProtocol.cpp.

{
    NS_ENSURE_ARG_POINTER(aUsername);
    NS_ENSURE_ARG_POINTER(aPassword);

    nsresult rv;
    nsCOMPtr<nsISmtpUrl> smtpUrl = do_QueryInterface(m_runningURL, &rv);
    NS_ENSURE_SUCCESS(rv,rv);
    
    nsCOMPtr<nsISmtpServer> smtpServer;
    rv = smtpUrl->GetSmtpServer(getter_AddRefs(smtpServer));
    NS_ENSURE_SUCCESS(rv,rv);
    
    rv = smtpServer->GetPassword(aPassword);
    NS_ENSURE_SUCCESS(rv,rv);

    if (*aPassword && **aPassword) {
        rv = smtpServer->GetUsername(aUsername);
        NS_ENSURE_SUCCESS(rv,rv);

        if (*aUsername && **aUsername)
            return rv;
        
        // empty username
        nsCRT::free(*aUsername);
        *aUsername = 0;
    }
    // empty password

    nsCRT::free(*aPassword);
    *aPassword = 0;

    nsXPIDLCString hostname;      
    rv = smtpServer->GetHostname(getter_Copies(hostname));
    NS_ENSURE_SUCCESS(rv, rv);

    const PRUnichar *formatStrings[] =
    {
      NS_ConvertASCIItoUCS2(hostname).get(),
      nsnull
    };

    rv = PromptForPassword(smtpServer, smtpUrl, formatStrings, aPassword);
    NS_ENSURE_SUCCESS(rv,rv);
    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsSmtpProtocol::Initialize ( nsIURI aURL) [private]

Definition at line 248 of file nsSmtpProtocol.cpp.

{
    NS_PRECONDITION(aURL, "invalid URL passed into Smtp Protocol");
    nsresult rv = NS_OK;

    m_flags = 0;
    m_origAuthFlags = 0;
    m_prefAuthMethod = PREF_AUTH_NONE;
    m_usernamePrompted = PR_FALSE;
    m_prefTrySSL = PREF_SECURE_TRY_STARTTLS;
    m_prefTrySecAuth = PR_TRUE;
    m_tlsInitiated = PR_FALSE;

    m_urlErrorState = NS_ERROR_FAILURE;

    if (!SMTPLogModule)
        SMTPLogModule = PR_NewLogModule("SMTP");
    
    if (aURL) 
        m_runningURL = do_QueryInterface(aURL);

    if (!mSmtpBundle)
        mSmtpBundle = do_GetService(NS_MSG_SMTPSTRINGSERVICE_CONTRACTID);
    
    // extract out message feedback if there is any.
    nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(aURL);
    if (mailnewsUrl)
        mailnewsUrl->GetStatusFeedback(getter_AddRefs(m_statusFeedback));

    m_dataBuf = (char *) PR_Malloc(sizeof(char) * OUTPUT_BUFFER_SIZE);
    m_dataBufSize = OUTPUT_BUFFER_SIZE;

    m_nextState = SMTP_START_CONNECT;
    m_nextStateAfterResponse = SMTP_START_CONNECT;
    m_responseCode = 0;
    m_previousResponseCode = 0;
    m_continuationResponse = -1; 
    m_tlsEnabled = PR_FALSE;
    m_addressCopy = nsnull;
    m_addresses = nsnull;

    m_addressesLeft = nsnull;
    m_verifyAddress = nsnull;
#ifdef UNREADY_CODE 
    m_totalAmountWritten = 0;
#endif /* UNREADY_CODE */

    m_sendDone = PR_FALSE;

    m_sizelimit = 0;
    m_totalMessageSize = 0;
    nsCOMPtr<nsIFileSpec> fileSpec;
    m_runningURL->GetPostMessageFile(getter_AddRefs(fileSpec));
    if (fileSpec)
        fileSpec->GetFileSize(&m_totalMessageSize);

    m_originalContentLength = 0;
    m_totalAmountRead = 0;

    m_lineStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, PR_TRUE);
    // ** may want to consider caching the server capability to save lots of
    // round trip communication between the client and server
    nsCOMPtr<nsISmtpServer> smtpServer;
    m_runningURL->GetSmtpServer(getter_AddRefs(smtpServer));
    if (smtpServer) {
        smtpServer->GetAuthMethod(&m_prefAuthMethod);
        smtpServer->GetTrySSL(&m_prefTrySSL);
        smtpServer->GetTrySecAuth(&m_prefTrySecAuth);
        smtpServer->GetHelloArgument(getter_Copies(m_helloArgument));
    }

    rv = RequestOverrideInfo(smtpServer);
    // if we aren't waiting for a login override, then go ahead an
    // open the network connection like we normally would have.
    if (NS_SUCCEEDED(rv) && TestFlag(SMTP_WAIT_FOR_REDIRECTION))
        return;

#if defined(PR_LOGGING)
    nsCAutoString hostName;
    aURL->GetAsciiHost(hostName);
    PR_LOG(SMTPLogModule, PR_LOG_ALWAYS, ("SMTP Connecting to: %s", hostName.get()));
#endif
    
    // When we are making a secure connection, we need to make sure that we
    // pass an interface requestor down to the socket transport so that PSM can
    // retrieve a nsIPrompt instance if needed.
    nsCOMPtr<nsIInterfaceRequestor> callbacks;
    nsCOMPtr<nsISmtpUrl> smtpUrl(do_QueryInterface(aURL));
    if (smtpUrl)
        smtpUrl->GetNotificationCallbacks(getter_AddRefs(callbacks));

    if (m_prefTrySSL == PREF_SECURE_ALWAYS_SMTPS)
        rv = OpenNetworkSocket(aURL, "ssl", callbacks);  
    else if (m_prefTrySSL != PREF_SECURE_NEVER)
    {
        rv = OpenNetworkSocket(aURL, "starttls", callbacks);  
        if (NS_FAILED(rv) && m_prefTrySSL == PREF_SECURE_TRY_STARTTLS)
        {
            m_prefTrySSL = PREF_SECURE_NEVER;
            rv = OpenNetworkSocket(aURL, nsnull, callbacks);
        }
    }
    else
        rv = OpenNetworkSocket(aURL, nsnull, callbacks);
    
    if (NS_FAILED(rv))
        return;
}

Here is the call graph for this function:

nsresult nsSmtpProtocol::LoadUrl ( nsIURI aURL,
nsISupports *  aConsumer = nsnull 
) [virtual]

Definition at line 1499 of file nsSmtpProtocol.cpp.

{
       nsresult rv = NS_OK;

  // if we are currently waiting for login redirection information
  // then hold off on loading the url....but be sure to remember 
  // aConsumer so we can use it later...
  if (TestFlag(SMTP_WAIT_FOR_REDIRECTION))
  {
    // mark a pending load...
    SetFlag(SMTP_LOAD_URL_PENDING);
    mPendingConsumer = aConsumer;
    return NS_OK;
  }
  else
    ClearFlag(SMTP_LOAD_URL_PENDING); 

  // otherwise begin loading the url

  PRInt32 status = 0; 
       m_continuationResponse = -1;  /* init */
       if (aURL)
       {
              m_runningURL = do_QueryInterface(aURL);

    // we had a bug where we failed to bring up an alert if the host
    // name was empty....so throw up an alert saying we don't have
    // a host name and inform the caller that we are not going to
    // run the url...

    nsCAutoString hostName;
    aURL->GetHost(hostName);
    if (hostName.IsEmpty())
    {
       nsCOMPtr <nsIMsgMailNewsUrl> aMsgUrl = do_QueryInterface(aURL);
       if (aMsgUrl)
       {
           aMsgUrl->SetUrlState(PR_TRUE, NS_OK);
           rv = aMsgUrl->SetUrlState(PR_FALSE /* we aren't running the url */, NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER); // set the url as a url currently being run...
       }
        return NS_ERROR_BUT_DONT_SHOW_ALERT;
    }
       
              PRBool postMessage = PR_FALSE;
              m_runningURL->GetPostMessage(&postMessage);

              if(postMessage)
              {
                     char *addrs1 = 0;
                     char *addrs2 = 0;
            m_nextState = SMTP_RESPONSE;
            m_nextStateAfterResponse = SMTP_EXTN_LOGIN_RESPONSE;

                     /* Remove duplicates from the list, to prevent people from getting
                            more than one copy (the SMTP host may do this too, or it may not.)
                            This causes the address list to be parsed twice; this probably
                            doesn't matter.
                     */

                     nsXPIDLCString addresses;
                     nsCOMPtr<nsIMsgHeaderParser> parser = do_GetService(NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID);

                     m_runningURL->GetRecipients(getter_Copies(addresses));

                     if (NS_SUCCEEDED(rv) && parser)
                     {
                            parser->RemoveDuplicateAddresses(nsnull, addresses, nsnull, PR_FALSE, &addrs1);

                            /* Extract just the mailboxes from the full RFC822 address list.
                               This means that people can post to mailto: URLs which contain
                               full RFC822 address specs, and we will still send the right
                               thing in the SMTP RCPT command.
                            */
                            if (addrs1 && *addrs1)
                            {
                                   rv = parser->ParseHeaderAddresses(nsnull, addrs1, nsnull, &addrs2, &m_addressesLeft);
                                   PR_FREEIF (addrs1);
                            }

                            if (m_addressesLeft == 0 || addrs2 == nsnull || CHECK_SIMULATED_ERROR(SIMULATED_SEND_ERROR_8)) // hmm no addresses to send message to...
                            {
                                   m_nextState = SMTP_ERROR_DONE;
                                   ClearFlag(SMTP_PAUSE_FOR_READ);
                                   status = NS_MSG_NO_RECIPIENTS;
          m_urlErrorState = NS_MSG_NO_RECIPIENTS;
                                   return(status);
                            }

                            m_addressCopy = addrs2;
                            m_addresses = m_addressCopy;
                     } // if parser
              } // if post message
              
              rv = nsMsgProtocol::LoadUrl(aURL, aConsumer);
       } // if we received a url!

       return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIMsgLogonRedirectionRequester::OnLogonRedirectionError ( in wstring  pErrMsg,
in boolean  badPassword 
) [inherited]

Here is the caller graph for this function:

void nsIMsgLogonRedirectionRequester::OnLogonRedirectionReply ( in wstring  pHost,
in unsigned short  pPort,
in string  pCookieData,
in unsigned short  pCookieSize 
) [inherited]
NS_IMETHODIMP nsSmtpProtocol::OnStopRequest ( nsIRequest request,
nsISupports *  ctxt,
nsresult  status 
)

Definition at line 411 of file nsSmtpProtocol.cpp.

{
  if (aStatus == NS_OK && !m_sendDone) {
    // if we are getting OnStopRequest() with NS_OK, 
    // but we haven't finished clean, that's spells trouble.
    // it means that the server has dropped us before we could send the whole mail
    // for example, see bug #200647
    PR_LOG(SMTPLogModule, PR_LOG_ALWAYS,
 ("SMTP connection dropped after %ld total bytes read", m_totalAmountRead));
    nsMsgAsyncWriteProtocol::OnStopRequest(nsnull, ctxt, NS_ERROR_NET_INTERRUPT);
  }
  else
    nsMsgAsyncWriteProtocol::OnStopRequest(nsnull, ctxt, aStatus);

  // okay, we've been told that the send is done and the connection is going away. So 
  // we need to release all of our state
  return nsMsgAsyncWriteProtocol::CloseSocket();
}

Here is the call graph for this function:

Definition at line 837 of file nsSmtpProtocol.cpp.

{
    PRInt32 status = 0;
    nsCAutoString buffer;
    nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);

    if (!m_tlsEnabled)
    {
        if(TestFlag(SMTP_EHLO_STARTTLS_ENABLED))
        {
            // Do not try to combine SMTPS with STARTTLS.
            // If PREF_SECURE_ALWAYS_SMTPS is set,
            // we are alrady using a secure connection.
            // Do not attempt to do STARTTLS,
            // even if server offers it.
            if (m_prefTrySSL == PREF_SECURE_TRY_STARTTLS ||
                m_prefTrySSL == PREF_SECURE_ALWAYS_STARTTLS)
            {
                buffer = "STARTTLS";
                buffer += CRLF;

                status = SendData(url, buffer.get());

                m_tlsInitiated = PR_TRUE;

                m_nextState = SMTP_RESPONSE;
                m_nextStateAfterResponse = SMTP_TLS_RESPONSE;
                SetFlag(SMTP_PAUSE_FOR_READ);
                return status;
            }
        }
        else if (m_prefTrySSL == PREF_SECURE_ALWAYS_STARTTLS)
        {
            m_nextState = SMTP_ERROR_DONE;
            m_urlErrorState = NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER_WITH_STARTTLS2;
            return(NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER);
        }
    }

    if (TestFlag(SMTP_AUTH_EXTERNAL_ENABLED))
    {
        buffer = "AUTH EXTERNAL =";
        buffer += CRLF;
        SendData(url, buffer.get());
        m_nextState = SMTP_RESPONSE;
        m_nextStateAfterResponse = SMTP_AUTH_EXTERNAL_RESPONSE;
        SetFlag(SMTP_PAUSE_FOR_READ);
        return NS_OK;
    }
    else
    if (m_prefAuthMethod == PREF_AUTH_ANY)
    {
        if (TestFlag(SMTP_AUTH_GSSAPI_ENABLED)) 
            m_nextState = SMTP_SEND_AUTH_GSSAPI_FIRST;
        else if (TestFlag(SMTP_AUTH_CRAM_MD5_ENABLED) ||
            TestFlag(SMTP_AUTH_NTLM_ENABLED) ||
            TestFlag(SMTP_AUTH_PLAIN_ENABLED))
            m_nextState = SMTP_SEND_AUTH_LOGIN_STEP1;
        else if (TestFlag(SMTP_AUTH_LOGIN_ENABLED) ||
            TestFlag(SMTP_AUTH_MSN_ENABLED))
            m_nextState = SMTP_SEND_AUTH_LOGIN_STEP0;
        /* potential security flaw when using DIGEST_MD5 (and maybe GSSAPI)
         * where not only the client is authenticated by the server
         * but also vice versa. Faked server could just not advertise
         * any mechanism to bypass authentication process.
         */
        else
        {
            m_nextState = SMTP_SEND_HELO_RESPONSE;
            // fake to 250 because SendHeloResponse() tests for this
            m_responseCode = 250;
        }
    }
    else
    {
        m_nextState = SMTP_SEND_HELO_RESPONSE;
        // fake to 250 because SendHeloResponse() tests for this
        m_responseCode = 250;
    }

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsSmtpProtocol::ProcessProtocolState ( nsIURI url,
nsIInputStream inputStream,
PRUint32  sourceOffset,
PRUint32  length 
) [private, virtual]

Definition at line 1603 of file nsSmtpProtocol.cpp.

 {
   PRInt32 status = 0;
   ClearFlag(SMTP_PAUSE_FOR_READ); /* already paused; reset */
   
   while(!TestFlag(SMTP_PAUSE_FOR_READ))
   {
     PR_LOG(SMTPLogModule, PR_LOG_ALWAYS, ("SMTP entering state: %d",
       m_nextState));
     switch(m_nextState) 
     {
     case SMTP_RESPONSE:
       if (inputStream == nsnull)
         SetFlag(SMTP_PAUSE_FOR_READ);
       else
         status = SmtpResponse(inputStream, length);
       break;
       
     case SMTP_START_CONNECT:
       SetFlag(SMTP_PAUSE_FOR_READ);
       m_nextState = SMTP_RESPONSE;
       m_nextStateAfterResponse = SMTP_EXTN_LOGIN_RESPONSE;
       break;
     case SMTP_FINISH_CONNECT:
       SetFlag(SMTP_PAUSE_FOR_READ);
       break;
     case SMTP_TLS_RESPONSE:
       if (inputStream == nsnull)
         SetFlag(SMTP_PAUSE_FOR_READ);
       else
         status = SendTLSResponse();
       break;
     case SMTP_EXTN_LOGIN_RESPONSE:
       if (inputStream == nsnull)
         SetFlag(SMTP_PAUSE_FOR_READ);
       else
         status = ExtensionLoginResponse(inputStream, length);
       break;
       
     case SMTP_SEND_HELO_RESPONSE:
       if (inputStream == nsnull)
         SetFlag(SMTP_PAUSE_FOR_READ);
       else
         status = SendHeloResponse(inputStream, length);
       break;
     case SMTP_SEND_EHLO_RESPONSE:
       if (inputStream == nsnull)
         SetFlag(SMTP_PAUSE_FOR_READ);
       else
         status = SendEhloResponse(inputStream, length);
       break;
     case SMTP_AUTH_PROCESS_STATE:
       status = ProcessAuth();
       break;
       
      case SMTP_SEND_AUTH_GSSAPI_FIRST:
        status = AuthGSSAPIFirst();
        break;

      case SMTP_SEND_AUTH_GSSAPI_STEP:
        status = AuthGSSAPIStep();
        break;
      
      case SMTP_SEND_AUTH_LOGIN_STEP0:
        status = AuthLoginStep0();
        break;
      
      case SMTP_AUTH_LOGIN_STEP0_RESPONSE:
        status = AuthLoginStep0Response();
        break;
      
      case SMTP_AUTH_EXTERNAL_RESPONSE:
      case SMTP_AUTH_LOGIN_RESPONSE:
        if (inputStream == nsnull)
          SetFlag(SMTP_PAUSE_FOR_READ);
        else
          status = AuthLoginResponse(inputStream, length);
        break;
      
      case SMTP_SEND_AUTH_LOGIN_STEP1:
        status = AuthLoginStep1();
        break;
      
      case SMTP_SEND_AUTH_LOGIN_STEP2:
        status = AuthLoginStep2(); 
        break;
      
      case SMTP_SEND_VRFY_RESPONSE:
        if (inputStream == nsnull)
          SetFlag(SMTP_PAUSE_FOR_READ);
        else
          status = SendVerifyResponse();
        break;
      
      case SMTP_SEND_MAIL_RESPONSE:
        if (inputStream == nsnull)
          SetFlag(SMTP_PAUSE_FOR_READ);
        else
          status = SendMailResponse();
        break;
      
      case SMTP_SEND_RCPT_RESPONSE:
        if (inputStream == nsnull)
          SetFlag(SMTP_PAUSE_FOR_READ);
        else
          status = SendRecipientResponse();
        break;
      
      case SMTP_SEND_DATA_RESPONSE:
        if (inputStream == nsnull)
          SetFlag(SMTP_PAUSE_FOR_READ);
        else
          status = SendDataResponse();
        break;
      
      case SMTP_SEND_POST_DATA:
        status = SendPostData(); 
        break;
      
      case SMTP_SEND_MESSAGE_RESPONSE:
        if (inputStream == nsnull)
          SetFlag(SMTP_PAUSE_FOR_READ);
        else
          status = SendMessageResponse();
        break;
      case SMTP_DONE:
        {
          nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(m_runningURL);
          mailNewsUrl->SetUrlState(PR_FALSE, NS_OK);
          m_nextState = SMTP_FREE;
        }
        break;
      
      case SMTP_ERROR_DONE:
        {
          nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(m_runningURL);
          // propagate the right error code
          mailNewsUrl->SetUrlState(PR_FALSE, m_urlErrorState);
        }
      
        m_nextState = SMTP_FREE;
        break;
      
      case SMTP_FREE:
        // smtp is a one time use connection so kill it if we get here...
        nsMsgAsyncWriteProtocol::CloseSocket(); 
        return NS_OK; /* final end */
      
      default: /* should never happen !!! */
        m_nextState = SMTP_ERROR_DONE;
        break;
    }
  
    /* check for errors during load and call error 
    * state if found
    */
    if(status < 0 && m_nextState != SMTP_FREE)
    {
      nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
      // send a quit command to close the connection with the server.
      if (SendData(url, "QUIT"CRLF) == NS_OK)
      {
        m_nextState = SMTP_RESPONSE;
        m_nextStateAfterResponse = SMTP_ERROR_DONE;
      }
      else
      {
      m_nextState = SMTP_ERROR_DONE;
      /* don't exit! loop around again and do the free case */
      ClearFlag(SMTP_PAUSE_FOR_READ);
    }
    }
  } /* while(!SMTP_PAUSE_FOR_READ) */

  return NS_OK;
}

Here is the call graph for this function:

nsresult nsSmtpProtocol::PromptForPassword ( nsISmtpServer aSmtpServer,
nsISmtpUrl aSmtpUrl,
const PRUnichar **  formatStrings,
char **  aPassword 
) [private]

Definition at line 1849 of file nsSmtpProtocol.cpp.

{
  nsresult rv;
  nsCOMPtr<nsIStringBundleService> stringService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
  NS_ENSURE_SUCCESS(rv,rv);
  
  nsCOMPtr<nsIStringBundle> composeStringBundle;
  rv = stringService->CreateBundle("chrome://messenger/locale/messengercompose/composeMsgs.properties", getter_AddRefs(composeStringBundle));
  NS_ENSURE_SUCCESS(rv,rv);
  
  nsXPIDLString passwordPromptString;
  if(formatStrings[1])
    rv = composeStringBundle->FormatStringFromID(NS_SMTP_PASSWORD_PROMPT2,
      formatStrings, 2,
      getter_Copies(passwordPromptString));
  else
    rv = composeStringBundle->FormatStringFromID(NS_SMTP_PASSWORD_PROMPT1,
      formatStrings, 1,
      getter_Copies(passwordPromptString));
  NS_ENSURE_SUCCESS(rv, rv);
  
  nsCOMPtr<nsIAuthPrompt> netPrompt;
  rv = aSmtpUrl->GetAuthPrompt(getter_AddRefs(netPrompt));
  NS_ENSURE_SUCCESS(rv, rv);
  
  nsXPIDLString passwordTitle;
  rv = composeStringBundle->GetStringFromID(NS_SMTP_PASSWORD_PROMPT_TITLE, getter_Copies(passwordTitle));
  NS_ENSURE_SUCCESS(rv,rv);
  
  rv = aSmtpServer->GetPasswordWithUI(passwordPromptString.get(), passwordTitle,
    netPrompt, aPassword);
  NS_ENSURE_SUCCESS(rv,rv);
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1932 of file nsSmtpProtocol.cpp.

{
  NS_ENSURE_ARG(aSmtpServer);

       nsresult rv;
       nsCAutoString contractID(NS_MSGLOGONREDIRECTORSERVICE_CONTRACTID);

  // go get the redirection type...
  nsXPIDLCString redirectionTypeStr; 
  aSmtpServer->GetRedirectorType(getter_Copies(redirectionTypeStr));

  const char * redirectionType = (const char *) redirectionTypeStr;

  // if we don't have a redirection type, then get out and proceed normally.
  if (!redirectionType || !*redirectionType )
    return NS_OK;

       contractID.Append('/');
       contractID.Append(redirectionTypeStr);

       m_logonRedirector = do_GetService(contractID.get(), &rv);
       if (m_logonRedirector && NS_SUCCEEDED(rv))
       {
              nsXPIDLCString password;
              nsXPIDLCString userName;
    PRBool requiresPassword = PR_TRUE;

              aSmtpServer->GetUsername(getter_Copies(userName));
    m_logonRedirector->RequiresPassword(userName, redirectionTypeStr.get(), &requiresPassword);
    if (requiresPassword)
                GetPassword(getter_Copies(password));

    nsCOMPtr<nsIPrompt> prompter;
    m_runningURL->GetPrompt(getter_AddRefs(prompter));
              rv = m_logonRedirector->Logon(userName, password, redirectionType, prompter, NS_STATIC_CAST(nsIMsgLogonRedirectionRequester *, this), nsMsgLogonRedirectionServiceIDs::Smtp);
       }

  // this protocol instance now needs to wait until
  // we receive the login redirection information so set the appropriate state
  // flag
  SetFlag(SMTP_WAIT_FOR_REDIRECTION);
  SetFlag(SMTP_USE_LOGIN_REDIRECTION);
  
  // even though we haven't started to send the message yet, 
  // we are going off and doing an asynch operation to get the redirection
  // information. So start the url as being run.
  nsCOMPtr <nsIMsgMailNewsUrl> mailNewsUrl = do_QueryInterface(m_runningURL);
  // this will cause another dialog to get thrown up....
       mailNewsUrl->SetUrlState(PR_TRUE /* start running url */, NS_OK);
  UpdateStatus(NS_SMTP_CONNECTING_TO_SERVER);
  // and update the status

       return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 926 of file nsSmtpProtocol.cpp.

{
  m_flags |= m_origAuthFlags;
}

Here is the caller graph for this function:

PRInt32 nsSmtpProtocol::SendData ( nsIURI aURL,
const char *  dataBuffer,
PRBool  aSuppressLogging = PR_FALSE 
) [virtual]

Definition at line 1383 of file nsSmtpProtocol.cpp.

{
  if (!dataBuffer) return -1;

  if (!aSuppressLogging) {
      PR_LOG(SMTPLogModule, PR_LOG_ALWAYS, ("SMTP Send: %s", dataBuffer));
  } else {
      PR_LOG(SMTPLogModule, PR_LOG_ALWAYS, ("Logging suppressed for this command (it probably contained authentication information)"));
  }
  return nsMsgAsyncWriteProtocol::SendData(url, dataBuffer);
}

Here is the caller graph for this function:

Definition at line 1396 of file nsSmtpProtocol.cpp.

{
  PRInt32 status = 0;
  char * command=0;   

  if((m_responseCode != 354) && (m_responseCode != 250)) {
    nsresult rv = nsExplainErrorDetails(m_runningURL, NS_ERROR_SENDING_DATA_COMMAND, m_responseText.get());
    NS_ASSERTION(NS_SUCCEEDED(rv), "failed to explain SMTP error");

    m_urlErrorState = NS_ERROR_BUT_DONT_SHOW_ALERT;
    return(NS_ERROR_SENDING_DATA_COMMAND);
       }

       PR_FREEIF(command);

    m_nextState = SMTP_SEND_POST_DATA;
    ClearFlag(SMTP_PAUSE_FOR_READ);   /* send data directly */

    UpdateStatus(SMTP_DELIV_MAIL);

         {
//            m_runningURL->GetBodySize(&m_totalMessageSize);
         }


    return(status);  
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRInt32 nsSmtpProtocol::SendEhloResponse ( nsIInputStream inputStream,
PRUint32  length 
) [private]

Definition at line 668 of file nsSmtpProtocol.cpp.

{
    PRInt32 status = 0;
    nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);

    if (m_responseCode != 250)
    {
        /* EHLO must not be implemented by the server, so fall back to the HELO case
         * if command is unrecognized or unimplemented.
         */
        if (m_responseCode == 500 || m_responseCode == 502)
        {
            /* STARTTLS is only available when advertised which requires EHLO */
            if (m_prefTrySSL == PREF_SECURE_ALWAYS_STARTTLS)
            {
                m_nextState = SMTP_ERROR_DONE;
                m_urlErrorState = NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER_WITH_STARTTLS1;
                return(NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER);
            }

            nsCAutoString buffer("HELO ");
            AppendHelloArgument(buffer);
            buffer += CRLF;

            status = SendData(url, buffer.get());

            m_nextState = SMTP_RESPONSE;
            m_nextStateAfterResponse = SMTP_SEND_HELO_RESPONSE;
            SetFlag(SMTP_PAUSE_FOR_READ);
            return (status);
        }
        /* e.g. getting 421 "Server says unauthorized, bye" or
         * 501 "Syntax error in EHLOs parameters or arguments"
         */
        else
        {
#ifdef DEBUG
            nsresult rv = 
#endif
            nsExplainErrorDetails(m_runningURL, NS_ERROR_SMTP_SERVER_ERROR,
                                  m_responseText.get());
            NS_ASSERTION(NS_SUCCEEDED(rv), "failed to explain SMTP error");

            m_urlErrorState = NS_ERROR_BUT_DONT_SHOW_ALERT;
            return(NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER);
        }
    }

    PRInt32 responseLength = m_responseText.Length();
    PRInt32 startPos = 0;
    PRInt32 endPos;
    do
    {
        endPos = m_responseText.FindChar('\n', startPos + 1);
        nsCAutoString responseLine;
        responseLine.Assign(Substring(m_responseText, startPos, 
            (endPos >= 0 ? endPos : responseLength) - startPos));
        responseLine.CompressWhitespace();

        if (responseLine.Compare("STARTTLS", PR_TRUE) == 0)
        {
            SetFlag(SMTP_EHLO_STARTTLS_ENABLED);
        }
        else if (responseLine.Compare("DSN", PR_TRUE) == 0)
        {
            SetFlag(SMTP_EHLO_DSN_ENABLED);
        }
        else if (responseLine.Compare("AUTH", PR_TRUE, 4) == 0)
        {
            if (responseLine.Find("PLAIN", PR_TRUE, 5) >= 0)  
                SetFlag(SMTP_AUTH_PLAIN_ENABLED);

            if (responseLine.Find("LOGIN", PR_TRUE, 5) >= 0)  
                SetFlag(SMTP_AUTH_LOGIN_ENABLED);

            if (responseLine.Find("EXTERNAL", PR_TRUE, 5) >= 0)  
                SetFlag(SMTP_AUTH_EXTERNAL_ENABLED);

            if(m_prefTrySecAuth)
            {
                if (responseLine.Find("GSSAPI", PR_TRUE, 5) >= 0)
                    SetFlag(SMTP_AUTH_GSSAPI_ENABLED);

                nsresult rv;
                nsCOMPtr<nsISignatureVerifier> verifier = do_GetService(SIGNATURE_VERIFIER_CONTRACTID, &rv);
                // this checks if psm is installed...
                if (NS_SUCCEEDED(rv))
                {
                    if (responseLine.Find("CRAM-MD5", PR_TRUE, 5) >= 0)
                      SetFlag(SMTP_AUTH_CRAM_MD5_ENABLED);

                    if (responseLine.Find("NTLM", PR_TRUE, 5) >= 0)  
                        SetFlag(SMTP_AUTH_NTLM_ENABLED);

                    if (responseLine.Find("MSN", PR_TRUE, 5) >= 0)
                        SetFlag(SMTP_AUTH_MSN_ENABLED);
                }
            }

            // for use after mechs disabled fallbacks when login failed
            BackupAuthFlags();
        }
        else if (responseLine.Compare("SIZE", PR_TRUE, 4) == 0)
        {
            SetFlag(SMTP_EHLO_SIZE_ENABLED);

            m_sizelimit = atol((responseLine.get()) + 4);
        }

        startPos = endPos + 1;
    } while (endPos >= 0);

    if(TestFlag(SMTP_EHLO_SIZE_ENABLED) &&
       m_sizelimit > 0 && (PRInt32)m_totalMessageSize > m_sizelimit)
    {
#ifdef DEBUG
        nsresult rv = 
#endif
        nsExplainErrorDetails(m_runningURL,
                      NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1, m_sizelimit);
        NS_ASSERTION(NS_SUCCEEDED(rv), "failed to explain SMTP error");

        m_urlErrorState = NS_ERROR_BUT_DONT_SHOW_ALERT;
        return(NS_ERROR_SENDING_FROM_COMMAND);
    }

    m_nextState = SMTP_AUTH_PROCESS_STATE;
    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRInt32 nsSmtpProtocol::SendHeloResponse ( nsIInputStream inputStream,
PRUint32  length 
) [private]

Definition at line 557 of file nsSmtpProtocol.cpp.

{
  PRInt32 status = 0;
  nsCAutoString buffer;
  nsresult rv;
  
  if (m_responseCode != 250)
  {
#ifdef DEBUG
    nsresult rv =
#endif
    nsExplainErrorDetails(m_runningURL, NS_ERROR_SMTP_SERVER_ERROR,
                          m_responseText.get());
    NS_ASSERTION(NS_SUCCEEDED(rv), "failed to explain SMTP error");

    m_urlErrorState = NS_ERROR_BUT_DONT_SHOW_ALERT;
    return(NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER);
  }

  // extract the email address from the identity
  nsXPIDLCString emailAddress;
  nsCOMPtr <nsIMsgIdentity> senderIdentity;
  rv = m_runningURL->GetSenderIdentity(getter_AddRefs(senderIdentity));
  if (NS_FAILED(rv) || !senderIdentity)
  {
    m_urlErrorState = NS_ERROR_COULD_NOT_GET_USERS_MAIL_ADDRESS;
    return(NS_ERROR_COULD_NOT_GET_USERS_MAIL_ADDRESS);
  }
  else 
  {
    senderIdentity->GetEmail(getter_Copies(emailAddress));
  }
  
  if(!((const char *)emailAddress) || CHECK_SIMULATED_ERROR(SIMULATED_SEND_ERROR_16))
  {
    m_urlErrorState = NS_ERROR_COULD_NOT_GET_USERS_MAIL_ADDRESS;
    return(NS_ERROR_COULD_NOT_GET_USERS_MAIL_ADDRESS);
  }
  
  if(m_verifyAddress)
  {
    buffer += "VRFY";
    buffer += m_verifyAddress;
    buffer += CRLF;
  }
  else
  {
    /* else send the MAIL FROM: command */
    nsCOMPtr<nsIMsgHeaderParser> parser = do_GetService(NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID);
    char *fullAddress = nsnull;
    if (parser) 
    {
      // pass nsnull for the name, since we just want the email.
      //
      // seems a little weird that we are passing in the emailAddress
      // when that's the out parameter 
      parser->MakeFullAddress(nsnull, nsnull /* name */, emailAddress /* address */, &fullAddress);
    }
#ifdef UNREADY_CODE         
    if (CE_URL_S->msg_pane) 
    {
      if (MSG_RequestForReturnReceipt(CE_URL_S->msg_pane)) 
      {
        if (TestFlag(SMTP_EHLO_DSN_ENABLED)) 
        {
          PR_snprintf(buffer, sizeof(buffer), 
            "MAIL FROM:<%.256s> RET=FULL ENVID=NS40112696JT" CRLF, fullAddress);
        }
        else 
        {
          FE_Alert (CE_WINDOW_ID, XP_GetString(XP_RETURN_RECEIPT_NOT_SUPPORT));
          PR_snprintf(buffer, sizeof(buffer), "MAIL FROM:<%.256s>" CRLF, fullAddress);
        }
      }
      else if (MSG_SendingMDNInProgress(CE_URL_S->msg_pane)) 
      {
        PR_snprintf(buffer, sizeof(buffer), "MAIL FROM:<%.256s>" CRLF, "");
      }
      else 
      {
        PR_snprintf(buffer, sizeof(buffer), "MAIL FROM:<%.256s>" CRLF, fullAddress);
      }
    }
    else 
#endif
    {
      buffer = "MAIL FROM:<";
      buffer += fullAddress;
      buffer += ">";
      if(TestFlag(SMTP_EHLO_SIZE_ENABLED))
        buffer += nsPrintfCString(" SIZE=%d", m_totalMessageSize);
      buffer += CRLF;
    }
    PR_Free (fullAddress);
  }
  
  nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
  status = SendData(url, buffer.get());
  
  m_nextState = SMTP_RESPONSE;
  
  if(m_verifyAddress)
    m_nextStateAfterResponse = SMTP_SEND_VRFY_RESPONSE;
  else
    m_nextStateAfterResponse = SMTP_SEND_MAIL_RESPONSE;
  SetFlag(SMTP_PAUSE_FOR_READ);
  
  return(status);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1272 of file nsSmtpProtocol.cpp.

{
  PRInt32 status = 0;
  nsCAutoString buffer;
  nsresult rv;

  if(m_responseCode != 250 || CHECK_SIMULATED_ERROR(SIMULATED_SEND_ERROR_11))
  {
    rv = nsExplainErrorDetails(m_runningURL,
     (m_responseCode == 452) ? NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED :
    ((m_responseCode == 552) ? NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2 :
                               NS_ERROR_SENDING_FROM_COMMAND),
                               m_responseText.get());

    NS_ASSERTION(NS_SUCCEEDED(rv), "failed to explain SMTP error");
    
    m_urlErrorState = NS_ERROR_BUT_DONT_SHOW_ALERT;
    return(NS_ERROR_SENDING_FROM_COMMAND);
  }

  /* Send the RCPT TO: command */
#ifdef UNREADY_CODE
  if (TestFlag(SMTP_EHLO_DSN_ENABLED) &&
    (CE_URL_S->msg_pane && 
    MSG_RequestForReturnReceipt(CE_URL_S->msg_pane)))
#else
    if (TestFlag(SMTP_EHLO_DSN_ENABLED) && PR_FALSE)
#endif
    {
      char *encodedAddress = esmtp_value_encode(m_addresses);
      
      if (encodedAddress) 
      {
        buffer = "RCPT TO:<";
        buffer += m_addresses;
        buffer += "> NOTIFY=SUCCESS,FAILURE ORCPT=rfc822;";
        buffer += encodedAddress;
        buffer += CRLF; 
        PR_FREEIF(encodedAddress);
      }
      else 
      {
        m_urlErrorState = NS_ERROR_OUT_OF_MEMORY;
        return (NS_ERROR_OUT_OF_MEMORY);
      }
    }
    else
    {
      buffer = "RCPT TO:<";
      buffer += m_addresses;
      buffer += ">";
      buffer += CRLF;
    }
    /* take the address we sent off the list (move the pointer to just
          past the terminating null.) */
    m_addresses += PL_strlen (m_addresses) + 1;
    m_addressesLeft--;
    nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
    status = SendData(url, buffer.get());
    
    m_nextState = SMTP_RESPONSE;
    m_nextStateAfterResponse = SMTP_SEND_RCPT_RESPONSE;
    SetFlag(SMTP_PAUSE_FOR_READ);
    
    return(status);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1424 of file nsSmtpProtocol.cpp.

{
       nsCOMPtr<nsIFileSpec> fileSpec;
  nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
       m_runningURL->GetPostMessageFile(getter_AddRefs(fileSpec));
       if (url && fileSpec)
        // need to fully qualify to avoid getting overwritten by a #define
        // in some windows header file
        nsMsgAsyncWriteProtocol::PostMessage(url, fileSpec);

       SetFlag(SMTP_PAUSE_FOR_READ);

       // for now, we are always done at this point..we aren't making multiple calls
       // to post data...

  UpdateStatus(SMTP_DELIV_MAIL);
  m_nextState = SMTP_RESPONSE;
  m_nextStateAfterResponse = SMTP_SEND_MESSAGE_RESPONSE;
  return(0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1476 of file nsSmtpProtocol.cpp.

{

  if(((m_responseCode != 354) && (m_responseCode != 250)) || CHECK_SIMULATED_ERROR(SIMULATED_SEND_ERROR_12)) {
    nsresult rv = nsExplainErrorDetails(m_runningURL, NS_ERROR_SENDING_MESSAGE, m_responseText.get());
    NS_ASSERTION(NS_SUCCEEDED(rv), "failed to explain SMTP error");

    m_urlErrorState = NS_ERROR_BUT_DONT_SHOW_ALERT;
    return(NS_ERROR_SENDING_MESSAGE);
       }

  UpdateStatus(SMTP_PROGRESS_MAILSENT);

    /* else */
    m_sendDone = PR_TRUE;
       nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
       SendData(url, "QUIT"CRLF); // send a quit command to close the connection with the server.
       m_nextState = SMTP_RESPONSE;
       m_nextStateAfterResponse = SMTP_DONE;
       return(0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1445 of file nsSmtpProtocol.cpp.

{
       // mscott: as a first pass, I'm writing everything at once and am not
       // doing it in chunks...

    PRInt32 status = 0;

       /* returns 0 on done and negative on error
        * positive if it needs to continue.
        */

       // check to see if url is a file..if it is...call our file handler...
       PRBool postMessageInFile = PR_TRUE;
       m_runningURL->GetPostMessage(&postMessageInFile);
       if (postMessageInFile)
       {
              return SendMessageInFile();
       }

       /* Update the thermo and the status bar.  This is done by hand, rather
          than using the FE_GraphProgress* functions, because there seems to be
          no way to make FE_GraphProgress shut up and not display anything more
          when all the data has arrived.  At the end, we want to show the
          "message sent; waiting for reply" status; FE_GraphProgress gets in
          the way of that.  See bug #23414. */

    return(status);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1339 of file nsSmtpProtocol.cpp.

{
  PRInt32 status = 0;
  nsCAutoString buffer;
  nsresult rv;

  if(m_responseCode != 250 && m_responseCode != 251)
  {
    rv = nsExplainErrorDetails(m_runningURL,
     (m_responseCode == 452) ? NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED :
    ((m_responseCode == 552) ? NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2 :
                               NS_ERROR_SENDING_RCPT_COMMAND),
                               m_responseText.get());

    NS_ASSERTION(NS_SUCCEEDED(rv), "failed to explain SMTP error");
    
    m_urlErrorState = NS_ERROR_BUT_DONT_SHOW_ALERT;
    return(NS_ERROR_SENDING_RCPT_COMMAND);
  }
  
  if(m_addressesLeft > 0)
  {
    /* more senders to RCPT to 
    */
    // fake to 250 because SendMailResponse() can't handle 251
    m_responseCode = 250;
    m_nextState = SMTP_SEND_MAIL_RESPONSE; 
    return(0);
  }
  
  /* else send the DATA command */
  buffer = "DATA";
  buffer += CRLF;
  nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);  
  status = SendData(url, buffer.get());
  
  m_nextState = SMTP_RESPONSE;  
  m_nextStateAfterResponse = SMTP_SEND_DATA_RESPONSE; 
  SetFlag(SMTP_PAUSE_FOR_READ);   
  
  return(status);  
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 799 of file nsSmtpProtocol.cpp.

{
  // only tear down our existing connection and open a new one if we received a 220 response
  // from the smtp server after we issued the STARTTLS 
  nsresult rv = NS_OK;
  if (m_responseCode == 220) 
  {
      nsCOMPtr<nsISupports> secInfo;
      nsCOMPtr<nsISocketTransport> strans = do_QueryInterface(m_transport, &rv);
      if (NS_FAILED(rv)) return rv;

      rv = strans->GetSecurityInfo(getter_AddRefs(secInfo));

      if (NS_SUCCEEDED(rv) && secInfo) {
          nsCOMPtr<nsISSLSocketControl> sslControl = do_QueryInterface(secInfo, &rv);

          if (NS_SUCCEEDED(rv) && sslControl)
              rv = sslControl->StartTLS();
      }

    if (NS_SUCCEEDED(rv))
    {
      m_nextState = SMTP_EXTN_LOGIN_RESPONSE;
      m_nextStateAfterResponse = SMTP_EXTN_LOGIN_RESPONSE;
      m_tlsEnabled = PR_TRUE;
      m_flags = 0; // resetting the flags
      BackupAuthFlags();
      return rv;
    }
  }

  ClearFlag(SMTP_EHLO_STARTTLS_ENABLED);
  m_tlsInitiated = PR_FALSE;
  m_nextState = SMTP_AUTH_PROCESS_STATE;

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1256 of file nsSmtpProtocol.cpp.

{
#if 0
  PRInt32 status = 0;
  char buffer[512];
  
  if(m_responseCode == 250 || m_responseCode == 251)
    return(NS_USER_VERIFIED_BY_SMTP);
  else
    return(NS_USER_NOT_VERIFIED_BY_SMTP);
#else  
  PR_ASSERT(0);
  return(-1);
#endif
}

Here is the caller graph for this function:

PRInt32 nsSmtpProtocol::SmtpResponse ( nsIInputStream inputStream,
PRUint32  length 
) [private]

Definition at line 461 of file nsSmtpProtocol.cpp.

{
  char * line = nsnull;
  char cont_char;
  PRUint32 ln = 0;
  PRBool pauseForMoreData = PR_FALSE;
  
  if (!m_lineStreamBuffer)
    return -1; // this will force an error and at least we won't crash
  
  line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData);
  
  if (pauseForMoreData || !line)
  {
    SetFlag(SMTP_PAUSE_FOR_READ); /* pause */
    PR_Free(line);
    return(ln);
  }
  
  m_totalAmountRead += ln;
  
  PR_LOG(SMTPLogModule, PR_LOG_ALWAYS, ("SMTP Response: %s", line));
  cont_char = ' '; /* default */
  // sscanf() doesn't update m_responseCode if line doesn't start
  // with a number. That can be dangerous. So be sure to set
  // m_responseCode to 0 if no items read.
  if (PR_sscanf(line, "%d%c", &m_responseCode, &cont_char) <= 0)
    m_responseCode = 0;
  
  if (m_continuationResponse == -1)
  {
    if (cont_char == '-')  /* begin continuation */
      m_continuationResponse = m_responseCode;

    // display the whole message if no valid response code or
    // message shorter than 4 chars
    m_responseText = (m_responseCode >= 100 && PL_strlen(line) > 3) ? line + 4 : line;
  }
  else
  { /* have to continue */
    if (m_continuationResponse == m_responseCode && cont_char == ' ')
      m_continuationResponse = -1;    /* ended */
    
    if (m_responseText.IsEmpty() || m_responseText.Last() != '\n')
      m_responseText += "\n";

    m_responseText += (PL_strlen(line) > 3) ? line + 4 : line;
  }
  
  if (m_responseCode == 220 && m_responseText.Length() && !m_tlsInitiated)
  { 
    m_nextStateAfterResponse = SMTP_EXTN_LOGIN_RESPONSE;
  }
  
  if (m_continuationResponse == -1)  /* all done with this response? */
  {
    m_nextState = m_nextStateAfterResponse;
    ClearFlag(SMTP_PAUSE_FOR_READ); /* don't pause */
  }
  
  PR_Free(line);
  return(0);  /* everything ok */
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsSmtpProtocol::UpdateStatus ( PRInt32  aStatusID) [private]

Definition at line 435 of file nsSmtpProtocol.cpp.

{
  if (m_statusFeedback)
  {
    nsXPIDLString msg;
    mSmtpBundle->GetStringByID(aStatusID, getter_Copies(msg));
    UpdateStatusWithString(msg);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 445 of file nsSmtpProtocol.cpp.

{
  if (m_statusFeedback && aStatusString)
    m_statusFeedback->ShowStatusString(aStatusString);
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 179 of file nsSmtpProtocol.h.

char* nsSmtpProtocol::m_addresses [private]

Definition at line 180 of file nsSmtpProtocol.h.

Definition at line 181 of file nsSmtpProtocol.h.

Definition at line 175 of file nsSmtpProtocol.h.

char* nsSmtpProtocol::m_dataBuf [private]

Definition at line 206 of file nsSmtpProtocol.h.

Definition at line 207 of file nsSmtpProtocol.h.

Definition at line 184 of file nsSmtpProtocol.h.

Definition at line 166 of file nsSmtpProtocol.h.

nsMsgLineStreamBuffer* nsSmtpProtocol::m_lineStreamBuffer [private]

Definition at line 177 of file nsSmtpProtocol.h.

Definition at line 159 of file nsSmtpProtocol.h.

Definition at line 183 of file nsSmtpProtocol.h.

Definition at line 171 of file nsSmtpProtocol.h.

Definition at line 172 of file nsSmtpProtocol.h.

Definition at line 267 of file nsSmtpProtocol.h.

Definition at line 209 of file nsSmtpProtocol.h.

Definition at line 189 of file nsSmtpProtocol.h.

Definition at line 190 of file nsSmtpProtocol.h.

Definition at line 192 of file nsSmtpProtocol.h.

Definition at line 174 of file nsSmtpProtocol.h.

Definition at line 173 of file nsSmtpProtocol.h.

Definition at line 176 of file nsSmtpProtocol.h.

Definition at line 162 of file nsSmtpProtocol.h.

Definition at line 197 of file nsSmtpProtocol.h.

Definition at line 185 of file nsSmtpProtocol.h.

Definition at line 167 of file nsSmtpProtocol.h.

Definition at line 193 of file nsSmtpProtocol.h.

Definition at line 195 of file nsSmtpProtocol.h.

Definition at line 199 of file nsSmtpProtocol.h.

Definition at line 204 of file nsSmtpProtocol.h.

Definition at line 165 of file nsSmtpProtocol.h.

Definition at line 191 of file nsSmtpProtocol.h.

Definition at line 182 of file nsSmtpProtocol.h.

Definition at line 152 of file nsSmtpProtocol.h.

Definition at line 156 of file nsSmtpProtocol.h.

Definition at line 220 of file nsSmtpProtocol.h.


The documentation for this class was generated from the following files: