Patch level : 12.0 1048
Files correlati : f20.trr f20.dir Commento : Invio Certificazione unica per email
This commit is contained in:
parent
c4971cffa0
commit
9a13b24bc8
@ -72,9 +72,18 @@ class TSimpleAutomask : public TAutomask
|
|||||||
public:
|
public:
|
||||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly) {return true;}
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly) {return true;}
|
||||||
TSimpleAutomask() { }
|
TSimpleAutomask() { }
|
||||||
virtual ~TSimpleAutomask() { }
|
TSimpleAutomask(const char* name, int num = 0) : TAutomask(name, num) { }
|
||||||
|
virtual ~TSimpleAutomask() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TSimpleVariableAutomask : public TVariable_automask
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly) { return true; }
|
||||||
|
TSimpleVariableAutomask() { }
|
||||||
|
TSimpleVariableAutomask(const char* name, int num = 0) : TVariable_automask(name, num) { }
|
||||||
|
virtual ~TSimpleVariableAutomask() { }
|
||||||
|
};
|
||||||
class TIBAN_mask : public TAutomask
|
class TIBAN_mask : public TAutomask
|
||||||
{
|
{
|
||||||
TString _last_iso;
|
TString _last_iso;
|
||||||
|
@ -900,3 +900,30 @@ void split_IBAN(const char * iban, TString & iso, TString & cin,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool send_mail(TToken_string & to, TToken_string & cc, TToken_string & ccn,
|
||||||
|
const char * subj, const char * text, TToken_string & attachment)
|
||||||
|
{
|
||||||
|
TString subject(subj);
|
||||||
|
short flags = 0; // not UI
|
||||||
|
|
||||||
|
#ifdef DBG
|
||||||
|
TString test_mail = ini_get_string(CONFIG_STUDIO, "Mail", "TestMail");
|
||||||
|
|
||||||
|
if (test_mail.full())
|
||||||
|
{
|
||||||
|
to = test_mail;
|
||||||
|
cc.cut(0);
|
||||||
|
ccn.cut(0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (subject.blank())
|
||||||
|
subject.cut(0) << TR("Invio di ") << attachment;
|
||||||
|
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");
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
@ -118,4 +118,7 @@ void build_IBAN(TString & iban, const char * iso, const char * icin,
|
|||||||
void split_IBAN(const char * iban, TString & iso, TString & icin,
|
void split_IBAN(const char * iban, TString & iso, TString & icin,
|
||||||
TString & bcin, TString & abi, TString & cab, TString & cc);
|
TString & bcin, TString & abi, TString & cab, TString & cc);
|
||||||
|
|
||||||
|
bool send_mail(TToken_string & to, TToken_string & cc, TToken_string & ccn,
|
||||||
|
const char * subj, const char * text, TToken_string & attachment);
|
||||||
|
|
||||||
#endif /* __UTILITY_H */
|
#endif /* __UTILITY_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user