Patch level : 4.0 612
Files correlati : ba3.exe cg0.exe cg2.exe Ricompilazione Demo : [ ] Commento : Aggiunto supporto per savare le transazioni anche in una cartella git-svn-id: svn://10.65.10.50/trunk@13985 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9c1089e4d8
commit
baef024a0a
@ -2,6 +2,7 @@
|
|||||||
#include <golem.h>
|
#include <golem.h>
|
||||||
#include <recarray.h>
|
#include <recarray.h>
|
||||||
#include <relapp.h>
|
#include <relapp.h>
|
||||||
|
#include <utility.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TRecipient
|
// TRecipient
|
||||||
@ -172,15 +173,23 @@ bool TPostman::dispatch_transaction(const TRectype& rec,
|
|||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
TToken_string dest;
|
TToken_string dest;
|
||||||
|
TToken_string file_dest;
|
||||||
|
|
||||||
for (int r = 0; r < _recipient.items(); r++)
|
for (int r = 0; r < _recipient.items(); r++)
|
||||||
{
|
{
|
||||||
const TRecipient& a = recipient(r);
|
const TRecipient& a = recipient(r);
|
||||||
if (a.can_receive(rec))
|
if (a.can_receive(rec))
|
||||||
dest.add(a.address());
|
{
|
||||||
|
const TFixed_string addr(a.address());
|
||||||
|
|
||||||
|
if (addr.find('@') >= 0)
|
||||||
|
dest.add(addr);
|
||||||
|
else
|
||||||
|
file_dest.add(addr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = dest.items() > 0;
|
if (dest.items() > 0)
|
||||||
if (ok)
|
|
||||||
{
|
{
|
||||||
TMail_message msg(dest.get(0));
|
TMail_message msg(dest.get(0));
|
||||||
for (const char* r = dest.get(1); r; r = dest.get())
|
for (const char* r = dest.get(1); r; r = dest.get())
|
||||||
@ -206,6 +215,20 @@ bool TPostman::dispatch_transaction(const TRectype& rec,
|
|||||||
}
|
}
|
||||||
ok = msg.send(TRUE);
|
ok = msg.send(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file_dest.items() > 0)
|
||||||
|
{
|
||||||
|
for (const char* r = file_dest.get(0); r; r = file_dest.get())
|
||||||
|
if (fexist(r))
|
||||||
|
{
|
||||||
|
TFilename output(r);
|
||||||
|
|
||||||
|
output.add(name.name());
|
||||||
|
ok &= fcopy(name, output);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
error_box("Non esiste la cartella %s", r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user