Patch level : 12.0 nopatch

Files correlati     :
Commento        :

Modifiche invio mail tramite campo
This commit is contained in:
smen 2021-10-20 17:41:16 +02:00
parent cab75a5926
commit 61aee7848b
2 changed files with 10 additions and 6 deletions

View File

@ -3542,7 +3542,7 @@ long xvt_sys_execute(const char* cmdline, BOOLEAN sync, BOOLEAN iconizetask)
delete p;
}
else
exitcode = wxExecute(cmd, wxEXEC_ASYNC);
exitcode = wxExecute(cmd, wxEXEC_ASYNC /* | wxEXEC_HIDE_CONSOLE*/);
}
return exitcode;

View File

@ -441,13 +441,13 @@ BOOLEAN xvt_powermail_send(const char* to, const char* cc, const char* ccn,
"{\n"
" $smtp.send($message);\n"
" write-host \"E-Mail sent\" \n"
" $exitCode = 1 \n"
" $exitCode = 0 \n"
" exit $exitCode \n"
"}\n"
"catch\n"
"{\n"
" write-host \"E-Mail not sent\" ; \n"
" $exitCode = 0 \n"
" $exitCode = 1 \n"
" exit $exitCode \n"
"}\n"
);
@ -458,7 +458,11 @@ BOOLEAN xvt_powermail_send(const char* to, const char* cc, const char* ccn,
//una volta scritto lo scritp ps1 cos'è che lo runna? Dove vinene aperta la PowerShell?
// al momento lo script generato da campo funziona se runnato direttamente da powershell
command << powerFile;
FILE *f;
fopen_s(&f, "maillog.log", "w");
fprintf(f, "Comando %s\n", (const char*)command);
int exit = xvt_sys_execute(command, true, true);
return exit;
}
fprintf(f, "exitcode = %d\n", exit);
fclose(f);
return exit == 0;
}