RetroBASIC
Retrogamecoding(.org) => Examples => Topic started by: Tomaaz on June 11, 2013, 02:02:00 AM
-
This example is sending a simple text e-mail.
local smtp = require("socket.smtp")
wiadomosc = {
headers = {
to = "<tomaaz@mailmix.pl>",
subject = "Test"
},
body = "This is a test message."
}
smtp.send{
from = "<egsl.user@retrogamecoding.org>",
rcpt = "<tomaaz@mailmix.pl>",
source = smtp.message(wiadomosc)
}
-
There i can get socket.smtp
-
You can get it here -> http://luaforge.net/projects/luasocket/ (http://luaforge.net/projects/luasocket/)
-
On Linux you can find it also in your distro repository. I tested my script on Mint 13 with luasocket and sendmail installed.
-
I don't know who was testing it, but it worked. I got two messages. ;)
-
Can anyone make a build of it for Haiku? I have tried it but it does not run. My knowledge is not so good to do that.
-
Can anyone make a build of it for Haiku? I have tried it but it does not run. My knowledge is not so good to do that.
I dont habe init.lua :-(