MIME part in BODYSTRUCTURE, the parameter 'NAME' now appears as
the first item in the list. Previously we output 'CHARSET' first. Either
one is perfectly legal IMAP, but the Asterisk voicemail application
stupidly assumes that 'NAME' will come first, and barfs if it doesn't. So
we cater to its naivete.
cprintf("("); /* begin body parameter list */
+ /* "NAME" must appear as the first parameter. This is not required by IMAP,
+ * but the Asterisk voicemail application blindly assumes that NAME will be in
+ * the first position. If it isn't, it rejects the message.
+ */
if (name != NULL) if (!IsEmptyStr(name)) {
cprintf("\"NAME\" ");
imap_strout(name);