webmcp

diff framework/env/net/send_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 a54cc7dcabf1
children b7596f5158d4
line diff
     1.1 --- a/framework/env/net/send_mail.lua	Tue Feb 16 21:03:52 2016 +0100
     1.2 +++ b/framework/env/net/send_mail.lua	Sun Feb 28 19:16:03 2016 +0100
     1.3 @@ -38,12 +38,13 @@
     1.4      mail = encode.mime.mail(args)
     1.5    end
     1.6    local envelope_from = args.envelope_from
     1.7 -  local command = {"/usr/sbin/sendmail", "-t", "-i"}
     1.8 +  local command = table.new(net._mail_config.command)
     1.9    if
    1.10      envelope_from and
    1.11 +    net._mail_config.envelope_from_option and
    1.12      string.find(envelope_from, "^[0-9A-Za-z%.-_@0-9A-Za-z%.-_]+$")
    1.13    then
    1.14 -    command[#command+1] = "-f"
    1.15 +    command[#command+1] = net._mail_config.envelope_from_option
    1.16      command[#command+1] = envelope_from
    1.17    end
    1.18    local stdout, errmsg, status = extos.pfilter(mail, table.unpack(command))

Impressum / About Us