mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-27 04:48:21 +01:00
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.
This commit is contained in:
parent
03ba06f70c
commit
32e7a107e2
@ -75,9 +75,9 @@ end
|
|||||||
function metat.__index:login(user, password)
|
function metat.__index:login(user, password)
|
||||||
self.try(self.tp:command("AUTH", "LOGIN"))
|
self.try(self.tp:command("AUTH", "LOGIN"))
|
||||||
self.try(self.tp:check("3.."))
|
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: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.."))
|
return self.try(self.tp:check("2.."))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user