From 1004751fa1f15183cff73a90b4e2dd491d059bf1 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Sat, 4 Feb 2023 03:46:38 +0100 Subject: [PATCH] Minor code change (moving some code around). --- 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}."