updated chmod
fix sending email in text format only