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.
Merge pull request #2216 from jezdez/fix-unicodeencode-error

Fix UnicodeEncodeError when sending mails after document edits with unicode characters in the title.