webmcp
annotate framework/env/net/configure_mail.lua @ 537:bde63bbbf24a
Updated copyright year in footer of documentation
| author | jbe | 
|---|---|
| date | Mon Apr 01 23:59:46 2019 +0200 (2019-04-01) | 
| parents | f87175f57591 | 
| children | 
| rev | line source | 
|---|---|
| jbe@444 | 1 --[[-- | 
| jbe@444 | 2 net.configure_mail{ | 
| jbe@444 | 3 command = command, -- table with binary name and static command line arguments | 
| jbe@444 | 4 envelope_from_option = envelope_from_option -- command line option to select "envelope from", e.g. "-f" | 
| jbe@444 | 5 } | 
| jbe@444 | 6 | 
| jbe@444 | 7 Configures the mail delivery system. | 
| jbe@529 | 8 Default: net.configure_mail{ command={"/usr/sbin/sendmail", "-t", "-i"}, envelope_from_option="-f" } | 
| jbe@444 | 9 | 
| jbe@444 | 10 --]]-- | 
| jbe@444 | 11 | 
| jbe@444 | 12 function net.configure_mail(args) | 
| jbe@444 | 13 local mail_config = { | 
| jbe@444 | 14 command = table.new(args.command), | 
| jbe@444 | 15 envelope_from_option = envelope_from_option | 
| jbe@444 | 16 } | 
| jbe@444 | 17 request.configure(function() | 
| jbe@444 | 18 net._mail_config = mail_config | 
| jbe@444 | 19 end) | 
| jbe@444 | 20 end |