diff --git a/conf/autoload_configs/switch.conf.xml b/conf/autoload_configs/switch.conf.xml index 73fa1dc7f5..c4ec287af3 100644 --- a/conf/autoload_configs/switch.conf.xml +++ b/conf/autoload_configs/switch.conf.xml @@ -26,6 +26,32 @@ + diff --git a/src/switch_utils.c b/src/switch_utils.c index 3f7d4df720..3fbb58a2a4 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -463,7 +463,11 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to, const char *fr if (ifd) { close(ifd); } +#ifdef WIN32 + switch_snprintf(buf, B64BUFFLEN, "type %s | %s %s %s", filename, runtime.mailer_app, runtime.mailer_app_args, to); +#else switch_snprintf(buf, B64BUFFLEN, "/bin/cat %s | %s %s %s", filename, runtime.mailer_app, runtime.mailer_app_args, to); +#endif if (system(buf)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to execute command: %s\n", buf); }