我想使用套接字库从 lua 向 gmail 帐户发送电子邮件。
smtp = require("socket.smtp")
address = { "<someone@gmail.com>" }
from = { "<someone@gmail.com>" }
theMessage = {
headers = {
to = "YOU",
cc = '"him" ',
subject = "I got something to tell you..."
},
body = "You're the best."
}
r, e = smtp.send{ from = from, rcpt = address, source = smtp.message(theMessage)}
当我做 print(e)
“拒绝连接”。
print(r)
无任何想法?
我只是按照网站的说明进行操作: http ://w3.impa.br/~diego/software/luasocket/smtp.html