Convert unicode to str when raising in IMAP server (#4830).
Merge remote-tracking branch 'refs/remotes/drebs/bug/4830_convert-unicode-to-str-when-raising-on-imap-server' into develop