Skip to content

Commit

Permalink
FS-4847 try this
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenk committed Nov 20, 2012
1 parent ce885f1 commit 2ee8058
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/switch_utils.c
Expand Up @@ -876,12 +876,16 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
}
}

if (fd > -1) {
close(fd);
fd = -1;
}

if (zstr(from)) {
from = "freeswitch";
}
#ifdef WIN32
switch_snprintf(buf, B64BUFFLEN, "type \"%s\" | \"%s\" -f %s %s %s", filename, runtime.mailer_app, from, runtime.mailer_app_args, to);
switch_snprintf(buf, B64BUFFLEN, "\"%s\" -f %s %s %s < \"%s\"", runtime.mailer_app, from, runtime.mailer_app_args, to, filename);
#else
switch_snprintf(buf, B64BUFFLEN, "/bin/cat %s | %s -f %s %s %s", filename, runtime.mailer_app, from, runtime.mailer_app_args, to);
#endif
Expand Down

0 comments on commit 2ee8058

Please sign in to comment.