From d63fe98078113af080b2d2a7dd4bb3b292f69307 Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Wed, 6 Nov 2024 14:04:30 +0100 Subject: [PATCH] Patch level : 12.00 1368 Files correlati : xvaga.dll xwsmtp.dll ba0100m.msk sc0.exe sc2100b.msk sc2400b.msk Commento: Invio estratti conti e solleciti via mail --- src/include/utility.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/include/utility.cpp b/src/include/utility.cpp index 28c34f34c..3baff7381 100755 --- a/src/include/utility.cpp +++ b/src/include/utility.cpp @@ -981,9 +981,22 @@ bool send_mail(TToken_string & to, TToken_string & cc, TToken_string & ccn, if (!(flags & 0x1) && to.empty_items() && cc.empty_items() && ccn.empty_items()) flags |= 0x1; // Forza UI in assenza di destinatari - static bool usePower = ini_get_bool(CONFIG_USER, "Mail", "Powershell"); + static int type = ini_get_int(CONFIG_USER, "Mail", "Type"); + bool ok = true; - bool ok = (usePower ? xvt_powermail_send(to, cc, ccn, subj, text, attachment, flags, user()) : - xvt_mail_send(to, cc, ccn, subj, text, attachment, flags)) != 0; - return ok; + switch (type) + { + case 0: + ok = xvt_mail_send(to, cc, ccn, subj, text, attachment, flags); + break; + case 1: + ok = xvt_powermail_send(to, cc, ccn, subj, text, attachment, flags, user()); + break; + case 2: + ok = xvt_wx_mail_send(to, cc, ccn, subj, text, attachment, flags); + break; + default: + break; + } + return ok; } \ No newline at end of file