From: Naveen Albert Date: Tue, 24 Sep 2024 11:44:25 +0000 (-0400) Subject: app_voicemail: Fix ill-formatted pager emails with custom subject. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9423710a5e28ba0c77f9eb189e39876834847337;p=thirdparty%2Fasterisk.git app_voicemail: Fix ill-formatted pager emails with custom subject. Add missing end-of-headers newline to pager emails with custom subjects, since this was missing from this code path. Resolves: #902 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index a15470e0f2..f54007c5fd 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -6033,12 +6033,15 @@ static int sendpage(char *srcemail, char *pager, int msgnum, char *context, char } } else { if (ast_strlen_zero(flag)) { - fprintf(p, "Subject: New VM\n\n"); + fprintf(p, "Subject: New VM" ENDL); } else { - fprintf(p, "Subject: New %s VM\n\n", flag); + fprintf(p, "Subject: New %s VM" ENDL, flag); } } + /* End of headers */ + fputs(ENDL, p); + if (pagerbody) { struct ast_channel *ast; if ((ast = ast_dummy_channel_alloc())) {