Add support fro removing from the end of the string.
Fixed parsing of received email.