diff --git a/include/golem.cpp b/include/golem.cpp index f2805fdf9..56e3c54f3 100755 --- a/include/golem.cpp +++ b/include/golem.cpp @@ -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 } - diff --git a/include/golem.h b/include/golem.h index e2bbd8b04..58cb45cf5 100755 --- a/include/golem.h +++ b/include/golem.h @@ -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; } diff --git a/include/postman.cpp b/include/postman.cpp index f38779109..3b44c6eee 100755 --- a/include/postman.cpp +++ b/include/postman.cpp @@ -6,8 +6,6 @@ #include #include -#include - /////////////////////////////////////////////////////////// // 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 - file_dest.add(addr); + { + 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; + } + } + } } } @@ -233,25 +242,20 @@ bool TPostman::dispatch_transaction(const TRectype& rec, FOR_EACH_TOKEN(file_dest, r) { - if (fexist(r)) - { - TFilename output; - int retry = 0; - for (retry = 0; retry < 10; retry++) // Per ora tento solo 10 volte - { - output = r; - output.add(basename); - output << retry << ".ini"; - if (!output.exist()) // Ho generato un nome buono - break; - } - if (retry >= 10) - ok = false; - else - ok = fcopy(name, output); - } - else - ok = error_box("Non esiste la cartella %s", r); + TFilename output; + int retry = 0; + for (retry = 0; retry < 10; retry++) // Per ora tento solo 10 volte + { + output = r; + output.add(basename); + output << retry << ".ini"; + if (!output.exist()) // Ho generato un nome buono + break; + } + if (retry >= 10) + ok = false; + else + ok = fcopy(name, output); } } }