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 eb624a5aa2)
releases/20.14
Naveen Albert 1 year ago committed by Asterisk Development Team
parent e866cba92b
commit b4f28e30e2

@ -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())) {

Loading…
Cancel
Save