fixes the problem that the filename of mail's attachment is not correct