fix mail plugin bug