mailer implementation for windows (FSCORE-115)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8985 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-07-10 15:35:35 +00:00
parent 7f511482d2
commit d2e4dee2bb
2 changed files with 30 additions and 0 deletions

View File

@@ -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);
}