]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Contains a patch for fixing an encoding problem when using Outlook to view voicemail...
authorMark Michelson <mmichelson@digium.com>
Wed, 13 Jun 2007 19:41:13 +0000 (19:41 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 13 Jun 2007 19:41:13 +0000 (19:41 +0000)
This fix has also been tested on Thunderbird, Evolution, Pine, and Mutt.
(Issue 9336, reported by marwick, patched by mutterc)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@69181 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 46a9c14cf7e155a0397e5b2760fcd841a3dd37cd..01dbbfb993113d6ea58bdda1a915bf64a783e4d6 100644 (file)
@@ -1931,10 +1931,10 @@ static void make_email_file(FILE *p, char *srcemail, struct ast_vm_user *vmu, in
        fprintf(p, "MIME-Version: 1.0" ENDL);
        if (attach_user_voicemail) {
                /* Something unique. */
-               snprintf(bound, sizeof(bound), "voicemail_%d%s%d%d", msgnum + 1, mailbox, getpid(), (unsigned int)ast_random());
-
-               fprintf(p, "Content-Type: multipart/mixed; boundary=\"%s\"" ENDL ENDL ENDL, bound);
+               snprintf(bound, sizeof(bound), "----voicemail_%d%s%d%d", msgnum + 1, mailbox, getpid(), (unsigned int)ast_random());
 
+               fprintf(p, "Content-Type: multipart/mixed; boundary=\"%s\"" ENDL, bound);
+               fprintf(p, ENDL ENDL "This is a multi-part message in MIME format." ENDL ENDL);
                fprintf(p, "--%s" ENDL, bound);
        }
        fprintf(p, "Content-Type: text/plain; charset=%s" ENDL "Content-Transfer-Encoding: 8bit" ENDL ENDL, charset);
@@ -1985,7 +1985,7 @@ static void make_email_file(FILE *p, char *srcemail, struct ast_vm_user *vmu, in
                fprintf(p, "Content-Disposition: attachment; filename=\"msg%04d.%s\"" ENDL ENDL, msgnum + 1, format);
                snprintf(fname, sizeof(fname), "%s.%s", attach, format);
                base_encode(fname, p);
-               fprintf(p, ENDL ENDL "--%s--" ENDL "." ENDL, bound);
+               fprintf(p, ENDL "--%s--" ENDL "." ENDL, bound);
                if (tmpfd > -1)
                        close(tmpfd);
                unlink(newtmp);