class EventMachine::Protocols::SmtpServer
def process_starttls
def process_starttls if @@parms[:starttls] if @state.include?(:starttls) send_data "503 TLS Already negotiated\r\n" elsif ! @state.include?(:ehlo) send_data "503 EHLO required before STARTTLS\r\n" else send_data "220 Start TLS negotiation\r\n" start_tls(@@parms[:starttls_options] || {}) @state << :starttls end else process_unknown end end