error when generate plain text version of email