Subject: bug#33613: 25.2; mail-header-parse-address: scan-error "Unbalanced parenthesis" 7 32

From: Glenn Morris <[email-masked]>
Date: Tue, 04 Dec 2018 14:03:05 -0500

micah anderson wrote:

>   mail-header-parse-address("dr ebs (\\_O<) <[email-masked]>")

It could probably be handled more elegantly, but IIUC

"dr ebs (\\_O<) <[email-masked]>"

isn't valid in an email header, because the () are special characters
that should be quoted in the display name, per RFC5322.

Ie this works:

(mail-header-parse-address "\"dr ebs (\\_O<)\" <[email-masked]>")

A nice summary at
https://stackoverflow.com/questions/24940588/validation-format-of-display-name-in-from-header