diff --git a/src/include/utility.cpp b/src/include/utility.cpp index 28c34f34c..3baff7381 100755 --- a/src/include/utility.cpp +++ b/src/include/utility.cpp @@ -981,9 +981,22 @@ bool send_mail(TToken_string & to, TToken_string & cc, TToken_string & ccn, if (!(flags & 0x1) && to.empty_items() && cc.empty_items() && ccn.empty_items()) flags |= 0x1; // Forza UI in assenza di destinatari - static bool usePower = ini_get_bool(CONFIG_USER, "Mail", "Powershell"); + static int type = ini_get_int(CONFIG_USER, "Mail", "Type"); + bool ok = true; - bool ok = (usePower ? xvt_powermail_send(to, cc, ccn, subj, text, attachment, flags, user()) : - xvt_mail_send(to, cc, ccn, subj, text, attachment, flags)) != 0; - return ok; + switch (type) + { + case 0: + ok = xvt_mail_send(to, cc, ccn, subj, text, attachment, flags); + break; + case 1: + ok = xvt_powermail_send(to, cc, ccn, subj, text, attachment, flags, user()); + break; + case 2: + ok = xvt_wx_mail_send(to, cc, ccn, subj, text, attachment, flags); + break; + default: + break; + } + return ok; } \ No newline at end of file