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-Tag: 18.26.0-rc1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec990d6a6e9851d43cc4ebd60d05c79d28526d57;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 (cherry picked from commit 44a6349b69d5688bfcb8093db9529a9347e0f305) --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 904fddb07b..72cae2cc65 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -6040,12 +6040,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())) {