From 32e7a107e2126eef794bf5be897cf7e89d12f83a Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Mon, 6 Aug 2012 23:57:41 +0200 Subject: [PATCH] Send SMTP AUTH LOGIN response using tp:send(). Fixes #18 tp:command() uppercases the command. Without a command we would end up with a space in front of the data. Therefore use send() directly here. --- src/smtp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smtp.lua b/src/smtp.lua index 26808f5..896b536 100644 --- a/src/smtp.lua +++ b/src/smtp.lua @@ -75,9 +75,9 @@ end function metat.__index:login(user, password) self.try(self.tp:command("AUTH", "LOGIN")) self.try(self.tp:check("3..")) - self.try(self.tp:command(mime.b64(user))) + self.try(self.tp:send(mime.b64(user) .. "\r\n")) self.try(self.tp:check("3..")) - self.try(self.tp:command(mime.b64(password))) + self.try(self.tp:send(mime.b64(password) .. "\r\n")) return self.try(self.tp:check("2..")) end