From becdf257ca6c78bb8fd5576ed4ffec51cba0f9ec Mon Sep 17 00:00:00 2001 From: smen Date: Tue, 19 Oct 2021 09:40:17 +0200 Subject: [PATCH] Patch level : 12.0 nopatch Files correlati : Commento : Modifiche invio mail tramite campo --- src/include/recset.cpp | 8 ++++---- src/include/spotlite.cpp | 8 +++----- src/include/spotlite.h | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/include/recset.cpp b/src/include/recset.cpp index c3ac0b2a7..05a9276ae 100755 --- a/src/include/recset.cpp +++ b/src/include/recset.cpp @@ -511,10 +511,10 @@ const TString & TRecordset::get_custom_query(const char * module, const char * q TString mod(module); TString var("Q"); - if (mod.blank()) - mod = dongle().in_module(query_var); - else - mod = mod.sleft(2); + if (mod.blank()) + mod = dongle().in_module("PS"); + else + mod = mod.sleft(2); var << module << query_var; diff --git a/src/include/spotlite.cpp b/src/include/spotlite.cpp index 31fb44c2f..364d4eabe 100755 --- a/src/include/spotlite.cpp +++ b/src/include/spotlite.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -102,7 +103,7 @@ bool spotlite_notify(const TFilename& pdf) } // Funzione per spedire un pdf via mail -bool spotlite_send_mail(const TFilename& pdf) +bool spotlite_send_mail(const TFilename& pdf, bool ui, bool receipt) { TToken_string to(15, ';'), cc(15, ';'), ccn(15, ';'), attach(pdf, ';'); TString subj, text; @@ -112,8 +113,5 @@ bool spotlite_send_mail(const TFilename& pdf) subj.cut(0) << TR("Invio di ") << pdf.name(); 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"); - ok = (usePower ? xvt_powermail_send(to, cc, ccn, subj, text, attach, flags, user()) : - xvt_mail_send(to, cc, ccn, subj, text, attach, flags)) != 0; - return ok; + return send_mail(to, cc, ccn, subj, text, attach, ui, receipt); } diff --git a/src/include/spotlite.h b/src/include/spotlite.h index 54c3350fe..830ebcb3a 100755 --- a/src/include/spotlite.h +++ b/src/include/spotlite.h @@ -8,6 +8,6 @@ bool spotlite_generate_name(const char* codnum, TFilename& pdf); KEY spotlite_ask_name(TFilename& pdf, int & size); bool spotlite_notify(const TFilename& pdf); -bool spotlite_send_mail(const TFilename& pdf); +bool spotlite_send_mail(const TFilename& pdf, bool ui = false, bool receipt = false); #endif