Patch level : 12.0 900
Files correlati : xvaga.dll Commento : Corretto invio mail con Powershell
This commit is contained in:
parent
cdd8c1afd1
commit
6c861d9fdb
@ -6,6 +6,7 @@
|
||||
#include <wx/file.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/mimetype.h>
|
||||
#include <fstream>
|
||||
|
||||
static wxString GetMailParam(const char* key, const char* def = "")
|
||||
{
|
||||
@ -394,8 +395,21 @@ BOOLEAN xvt_powermail_send(const char* to, const char* cc, const char* ccn,
|
||||
);
|
||||
file.Close();
|
||||
|
||||
wxString command;
|
||||
command << "PowerShell -NonInteractive -NoProfile -Command \"& {"<< powerFile <<"; exit $LastExitCode }\"";
|
||||
wxString command;
|
||||
command << "PowerShell -ExecutionPolicy ByPass -NonInteractive -NoProfile -Command \"& {" << powerFile << "; exit $LastExitCode }\"";
|
||||
|
||||
return system(command);;
|
||||
BOOLEAN sys_command = (BOOLEAN)system(command);
|
||||
if (!sys_command)
|
||||
{
|
||||
std::ofstream fout;
|
||||
wxString error_file;
|
||||
error_file << userTemp << "\\" << "error_mail.txt";
|
||||
fout.open(error_file, std::ios_base::out);
|
||||
if (fout.is_open())
|
||||
{
|
||||
fout << command << "\n";
|
||||
fout.close();
|
||||
}
|
||||
}
|
||||
return sys_command;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user