webmcp
diff framework/env/net/configure_mail.lua @ 444:5d307886bd89
Added net.configure_mail{...} function to allow other mail interfaces than sendmail
author | jbe |
---|---|
date | Sun Feb 28 19:16:03 2016 +0100 (2016-02-28) |
parents | |
children | f87175f57591 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/framework/env/net/configure_mail.lua Sun Feb 28 19:16:03 2016 +0100 1.3 @@ -0,0 +1,20 @@ 1.4 +--[[-- 1.5 +net.configure_mail{ 1.6 + command = command, -- table with binary name and static command line arguments 1.7 + envelope_from_option = envelope_from_option -- command line option to select "envelope from", e.g. "-f" 1.8 +} 1.9 + 1.10 +Configures the mail delivery system. 1.11 +Default: net.configure_mail{ command={"sendmail", "-t", "-i"}, envelope_from_option="-f" } 1.12 + 1.13 +--]]-- 1.14 + 1.15 +function net.configure_mail(args) 1.16 + local mail_config = { 1.17 + command = table.new(args.command), 1.18 + envelope_from_option = envelope_from_option 1.19 + } 1.20 + request.configure(function() 1.21 + net._mail_config = mail_config 1.22 + end) 1.23 +end