Update API for the email library.

master
Philippe Pittoli 2023-02-03 07:25:41 +01:00
parent 980ec543b1
commit 058fe7d3c7
1 changed files with 6 additions and 2 deletions

View File

@ -18,6 +18,8 @@ class Baguette::Configuration
# for machines without glibc (such as on alpine linux).
property smtpd_host : String = "127.0.0.1"
property smtpd_port : UInt16 = 25
# "your.host.example.com"
property smtpd_helo_domain : String = "localhost"
property verbosity : Int32 = 3
@ -101,7 +103,7 @@ opt_help = -> (parser : OptionParser) {
parser = OptionParser.new do |parser|
parser.banner = "Welcome on the Altideal CLI administration."
parser.banner = "Mailer."
parser.on "-v verbosity", "--verbosity v", "Verbosity. From 0 to 4 (debug)." do |v|
Baguette::Context.verbosity = v.to_i
Baguette::Log.info "verbosity = #{v}"
@ -208,7 +210,9 @@ def main
pp! mail_conf
end
smtpd_config = EMail::Client::Config.new mail_conf.smtpd_host, mail_conf.smtpd_port.to_i
smtpd_config = EMail::Client::Config.new mail_conf.smtpd_host,
mail_conf.smtpd_port.to_i,
helo_domain: mail_conf.smtpd_helo_domain
smtpd_client = EMail::Client.new smtpd_config
actions = Actions.new mail_conf, smtpd_client