Fix UnicodeEncodeError when sending mails after document edits with unicode

characters in the title.

Also renamed some variable to have more than one character in the name.