When password contains % sign, it has to be escaped with %%. Otherwise you will get 530 Login authentication failed error.
It happens because commands are pre-formatted before sending them to textproto.Cmd. As a result, the command text is being used as a format parameter without arguments, so that the password "a%b" will turn to "a%!b(MISSING)"