fix the problem of encoding
fix the problem of wrting mail content from multiple files