RetroBASIC

Retrogamecoding(.org) => Examples => Topic started by: Tomaaz on June 11, 2013, 02:02:00 AM

Title: Sending e-mail with EGSL and Luasocket
Post by: Tomaaz on June 11, 2013, 02:02:00 AM
This example is sending a simple text e-mail.

Code: [Select]
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)
}
Title: Re: Sending e-mail with EGSL and Luasocket
Post by: lelldorin on June 20, 2013, 07:13:21 PM
There i can get socket.smtp
Title: Re: Sending e-mail with EGSL and Luasocket
Post by: cvirus on June 20, 2013, 07:45:54 PM
You can get it here -> http://luaforge.net/projects/luasocket/ (http://luaforge.net/projects/luasocket/)
Title: Re: Sending e-mail with EGSL and Luasocket
Post by: Tomaaz on June 20, 2013, 08:59:28 PM
On Linux you can find it also in your distro repository. I tested my script on Mint 13 with luasocket and sendmail installed.
Title: Re: Sending e-mail with EGSL and Luasocket
Post by: Tomaaz on June 24, 2013, 10:39:46 AM
I don't know who was testing it, but it worked. I got two messages. ;)
Title: Re: Sending e-mail with EGSL and Luasocket
Post by: lelldorin on July 03, 2013, 04:45:14 PM
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.
Title: Re: Sending e-mail with EGSL and Luasocket
Post by: lelldorin on July 03, 2013, 04:49:19 PM
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 :-(