# include "SMTPSession.h" # include "SMTPServer.h" # include "Log.h" namespace mail { SMTPSession::SMTPSession(core::EPoll &ePoll, core::TCPServer &server) : TCPSession(ePoll, &server, "SMTP Client Session") {} void SMTPSession::onConnected() { coreutils::Log(coreutils::LOG_DEBUG_2) << "onConnected -> sending 220"; // RFC 5321 4.2 requires the greeting to name the server's own // domain - the literal "localhost" was hardcoded here regardless // of the hostName this server was actually configured with. out << "220 " << ((SMTPServer *)server)->hostName << " BMAMail" << CRLF; } }