From a3e8e4c4847d204802b4007843b7aa20c90b6005 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Sat, 4 Feb 2023 03:46:38 +0100 Subject: [PATCH] Grooming. --- src/mailer.cr | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/mailer.cr b/src/mailer.cr index 3d894ae..aa3d6b2 100644 --- a/src/mailer.cr +++ b/src/mailer.cr @@ -210,15 +210,14 @@ def main pp! mail_conf end - 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 - # Now we did read the intent, we should proceed doing what was asked. begin + 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 + actions.the_call[Context.command].call rescue e Baguette::Log.info "The command is not recognized (or implemented): #{e}."