view src/luan/modules/mail/Mail.luan @ 1337:8b61c8c4e07a

remove slf4j
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 15 Feb 2019 07:14:50 -0700
parents 1f9d34a6f308
children 8d95711f6615
line wrap: on
line source

java()
local Luan = require "luan:Luan.luan"
local error = Luan.error
local type = Luan.type or error()
local System = require "java:java.lang.System"
local SmtpCon = require "java:luan.modules.mail.SmtpCon"


local Mail = {}

System.setProperty( "mail.mime.charset", "UTF-8" )

function Mail.Sender(params)
	type(params)=="table" or error()
	local smtpCon = SmtpCon.new(params)
	return { send = smtpCon.send }
end

return Mail