you are viewing a single comment's thread.

view the rest of the comments →

[–]fschmidt[S] 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (1 child)

Yes, below is the high level mail interface for Luan. But note that it is still a thin layer.

local Mail = require "luan:mail/Mail.luan"

Mail.sender{
    host = "smtpcorp.com"
    username = "smtp@luan.software"
    password = "luanhost"
    port = 2525
}.send{
    From = "smtp@luan.software"
    To = "fschmidt@gmail.com"
    Subject = "test"
    body = [[
testing
1
2
3
]]
}

and

local Mail = require "luan:mail/Mail.luan"

Mail.sender{
    host = "smtpcorp.com"
    username = "smtp@luan.software"
    password = "luanhost"
    port = 2525
}.send{
    From = "smtp@luan.software"
    To = "fschmidt@gmail.com"
    Subject = "test attachment"
    body = {
        {
            body = "see attachment"
        }
        {
            ["Content-Disposition"] = [[attachment; filename="test.txt"]]
            body = [[
testing
1
2
3
]]
        }
    }
}

[–][deleted] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (0 children)

She's a beauty. You totally remind me of these guys: https://suckless.org/philosophy/