You forgot a header to make it a valid MIME message. I added a line to the segment of code below: > def mailFileToUser(_userName, _fileName): > outputfp = StringIO.StringIO() > w = MimeWriter.MimeWriter(outputfp) > w.addheader("subject", "Strip studie rapport") ---> w.addheader("Mime-Version", "1.0") > w.flushheaders()