Patch level : 4.0
Files correlati : ba7 Ricompilazione Demo : [ ] Commento : Aggiunto supporto per protocollo CNP per il postino git-svn-id: svn://10.65.10.50/trunk@15506 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7dd58d9453
commit
15778c5f1c
@ -1104,6 +1104,12 @@ void TMail_message::set_date_time(const char* str)
|
||||
}
|
||||
}
|
||||
|
||||
void TMail_message::set_date_time(const TDate& date, long hhmmss)
|
||||
{
|
||||
_date = date;
|
||||
_hms = hhmmss;
|
||||
}
|
||||
|
||||
// Certified 100%
|
||||
const TString& TMail_message::recipient(int n) const
|
||||
{
|
||||
@ -1245,4 +1251,3 @@ bool TMail_messages::remove()
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
const TString& id() const { return _id; }
|
||||
|
||||
void set_date_time(const char* date_time);
|
||||
void set_date_time(const TDate& date, long hhmmss = 0);
|
||||
const TDate& date() const { return _date; }
|
||||
long time() const { return _hms; }
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
#include <scanner.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TRecipient
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -178,18 +176,29 @@ bool TPostman::dispatch_transaction(const TRectype& rec,
|
||||
{
|
||||
TToken_string dest;
|
||||
TToken_string file_dest;
|
||||
TString last_error;
|
||||
|
||||
for (int r = 0; r < _recipient.items(); r++)
|
||||
{
|
||||
const TRecipient& a = recipient(r);
|
||||
if (a.can_receive(rec))
|
||||
{
|
||||
const TFixed_string addr(a.address());
|
||||
|
||||
if (addr.find('@') >= 0)
|
||||
const TString& addr = a.address();
|
||||
if (addr.find('@') >= 0) // Indirizzo posta
|
||||
dest.add(addr);
|
||||
else
|
||||
{
|
||||
if (fexist(addr))
|
||||
file_dest.add(addr);
|
||||
else
|
||||
{
|
||||
if (addr != last_error)
|
||||
{
|
||||
ok = error_box(FR("Non esiste la cartella di destinazione %s"), (const char*)addr);
|
||||
last_error = addr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -232,8 +241,6 @@ bool TPostman::dispatch_transaction(const TRectype& rec,
|
||||
tl->tm_hour, tl->tm_min, tl->tm_sec);
|
||||
|
||||
FOR_EACH_TOKEN(file_dest, r)
|
||||
{
|
||||
if (fexist(r))
|
||||
{
|
||||
TFilename output;
|
||||
int retry = 0;
|
||||
@ -249,9 +256,6 @@ bool TPostman::dispatch_transaction(const TRectype& rec,
|
||||
ok = false;
|
||||
else
|
||||
ok = fcopy(name, output);
|
||||
}
|
||||
else
|
||||
ok = error_box("Non esiste la cartella %s", r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user