Patch level : 12.0 nopatch

Files correlati     :
Commento        :

Modifiche invio mail tramite campo
This commit is contained in:
smen 2021-10-19 09:40:17 +02:00
parent 8f719c36c5
commit becdf257ca
3 changed files with 8 additions and 10 deletions

View File

@ -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;

View File

@ -4,6 +4,7 @@
#include <modaut.h>
#include <spotlite.h>
#include <defmask.h>
#include <utility.h>
#include <bagn003.h>
@ -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);
}

View File

@ -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