I am wanting to send an email to a gmail account from lua using the socket library.
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)}
When I do print(e)
"connection refused".
print(r)
nil Any ideas?
I'm just following instructions from the site: http://w3.impa.br/~diego/software/luasocket/smtp.html