]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
allow templates to contain mime encoded messages
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 28 Nov 2007 20:51:25 +0000 (20:51 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 28 Nov 2007 20:51:25 +0000 (20:51 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6419 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_utils.c

index 9274be47bc1d2bc9c9e4cadd66d0848ca0009341..9df0dcc15bc2f9910384be0e77b8f05421b8266b 100644 (file)
@@ -176,7 +176,11 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to, const char *fr
             return SWITCH_FALSE;
 
         if (file) {
-            snprintf(buf, B64BUFFLEN, "--%s\nContent-Type: text/plain\n\n", bound);
+                       if (body && switch_stristr("content-type", body)) {
+                               snprintf(buf, B64BUFFLEN, "--%s\n", bound);
+                       } else {
+                               snprintf(buf, B64BUFFLEN, "--%s\nContent-Type: text/plain\n\n", bound);
+                       }
             if (!write_buf(fd, buf))
                 return SWITCH_FALSE;
         }