Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

void PSMTPServer::OnEHLO ( const PCaselessString remoteHost ) [protected, virtual]
Parameters:
remoteHostName of remote host.

Definition at line 483 of file inetmail.cxx.

References PIPSocket::GetHostName(), PIPSocket::GetPeerHostName(), PInternetProtocol::GetSocket(), PString::IsEmpty(), and PInternetProtocol::WriteResponse().

Referenced by ProcessCommand().

{
  extendedHello = TRUE;
  ServerReset();

  PCaselessString peerHost;
  PIPSocket * socket = GetSocket();
  if (socket != NULL)
    peerHost = socket->GetPeerHostName();

  PString response = PIPSocket::GetHostName() & "Hello" & peerHost + ", ";

  if (remoteHost == peerHost)
    response += ", pleased to meet you.";
  else if (remoteHost.IsEmpty())
    response += "why do you wish to remain anonymous?";
  else
    response += "why do you wish to call yourself \"" + remoteHost + "\"?";

  response += "\nHELP\nVERB\nONEX\nMULT\nEXPN\nTICK\n8BITMIME\n";
  WriteResponse(250, response);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index